First, find the number of numbers from to whicharedivisible by any of using this formula:

Let {product of members of taken 2 at a time}, {product of members of taken 3 at a time}, …, Then the number of numbers which are divisible is

The number of numbers that are not divisible is then