ABSTRACT

PROBLEM 4.1 How many integers are there in the range from 1 to 1,000,000 that are divisible by 2 or 3 or both?

Solution We let D2 and D3 be the sets of those integers in the range from 1 to 1,000,000 that are divisible by 2 and by 3, respectively. By Theorem 4.1, #(D2 ∪ D3) = #(D2) + #(D3) −  #(D2 ∩ D3). Clearly, #(D2) = 500,000 and #(D3 ) = 333,333. Now, an integer is divisible by both 2 and 3 if and only if it is divisible by 6. Hence #(D2 ∩ D3) = 166,666. Therefore #(D2 ∪ D3) = 500,000 + 333,333 − 166,666 = 666,667.