SOLUTION: How many numbers from 1-1000 are there that are not divisible by any of the digits 2,3,5.

Algebra ->  Divisibility and Prime Numbers -> SOLUTION: How many numbers from 1-1000 are there that are not divisible by any of the digits 2,3,5.      Log On


   



Question 1025865: How many numbers from 1-1000 are there that are not divisible by any of the digits 2,3,5.
Found 2 solutions by ikleyn, KMST:
Answer by ikleyn(52788) About Me  (Show Source):
You can put this solution on YOUR website!
.
How many numbers from 1-1000 are there that are not divisible by any of the highlight%28cross%28digits%29%29 numbers 2,3,5.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

500 are divisible by 2            (set A).
333 are divisible by 3            (set B).
200 are divisible by 5            (set C).

166 are divisible by  6 = 2*3     (set AB, intersection of A and B).
100 are divisible by 10 = 2*5     (set AC, intersection of A and C).
 66 are divisible by 15 = 3*5     (set BC, intersection of B and C).

 33 are divisible by 30 = 2*3*5   (set ABC, intersection of A, B, and C).

Now, the number of integers from 1 to 1000 that are not divisible by any of the numbers 2,3,5, is

  1000 - |A| - |B| - |C| + |AB| + |AC| + |BC| - |ABC|.     (1) 

It is equal to

  1000 - 500 - 333 - 200 + 166 + 100 + 66 - 33 = 266.

And all that you (we, I) need is to prove the formula (1).

I will do it now.

Since we want to count those integer from 1 to 1000 that are not divisible by any of the numbers 2,3,5, 
we exclude/distract the quantities of |A|, |B|, and |C| from 1000.  (Step 1).

But doing this, we exclude/distract two times those integers that are in the intersections AB, AC and BC. 
Therefore, we add these quantities in (1) for compensation.   (Step 2). 

In the step 1, we excluded/distracted 3 times the numbers of the set ABC.
In the step 2, we restored/added      3 times the numbers of the set ABC.
But we still need to exlude/distract the set ABC.
And we do it in the last term of the formula (1).

The formula (1) is proved, and the problem is solved.

Congratulations !!!


Answer by KMST(5328) About Me  (Show Source):
You can put this solution on YOUR website!
Among the numbers 1 - 1000 ,
1000%2F2=500 are divisible by 2 ;
1000%2F5=200 are divisible by 5 ,
and since 1000%2F3=333%261%2F3 ,
333 are divisible by 3 .
1000%2F%282%2A5%29=1000%2F10=100 are divisible by 2 and 5 ;
166 are divisible by 2 and 3
(because 1000%2F%282%2A3%29=1000%2F6=166%262%2F3 ),
and since 1000%2F%283%2A5%29=1000%2F15=66%262%2F3 ,
66 are divisible by 3 and 5 .
Also, since 1000%2F%282%2A3%2A5%29=1000%2F30=33%261%2F3 ,
33 of the numbers 1 - 1000 are divisible by 2 , 3 and 5 .
So the numbers from 1 through 100 that are not divisible by any of the digits 2, 3, and 5 are
1000-500-200-333%2B100%2B166%2B66-33=highlight%28266%29