Clear Notion Academy

Permutations and Combinations (Beyond Advanced) Practice: How many integers n with 1 n 1000 are divisible by none of 2,3,5,7 ?

Question

How many integers nn with 1≤n≤10001\le n\le1000 are divisible by none of 2,3,5,72,3,5,7?

Answer

Answer: 228

Hint

Use inclusion-exclusion with floors; the product formula 1000∏(1−1/p)1000\prod(1-1/p) is only approximate here.

Solution

Let ApA_p be the multiples of pp in the range. Singles: 500+333+200+142=1175500+333+200+142=1175. Pairs (6,10,14,15,21,356,10,14,15,21,35): 166+100+71+66+47+28=478166+100+71+66+47+28=478. Triples (30,42,70,10530,42,70,105): 33+23+14+9=7933+23+14+9=79. Quadruple (210210): 44. The count with none of the properties is 1000−1175+478−79+4=2281000-1175+478-79+4=228. The estimate 1000⋅12⋅23⋅45⋅67≈228.571000\cdot\frac12\cdot\frac23\cdot\frac45\cdot\frac67\approx228.57 is not an integer: the exact answer requires the floors.

More questions from Permutations and Combinations (Beyond Advanced) Practice

Practise the full set: Permutations and Combinations — Beyond Advanced