combinatorics

find the number of integer between 1 and 1000 inclusive which are not divisible by any of 2,3 and 7


The answer is 286.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

4 solutions

Joshua Hornick
May 3, 2015

1000 x 1/2 x 2/3 x 6/7 (round up) or

1000/2 + 1000/3 + 1000/7 -1000/6 -1000/14 - 1000/21 + 1000/42 (always round down to the integer value)

Parth Bhardwaj
Feb 28, 2015

first find the no. of such numbers till 42(LCM of these 3 numbers), which is equal to 12. If observed deeply this pattern repeats in each set of multiple of 42 (e.g. till 42 there are 12, till 84 there will be 24(12 2),till 126 there will be 36 (12 3) and so on...... So this pattern will go on till 966 which will make it to 276(23*12) such numbers.And for the remaining 34 numbers till 1000 you can do it mentally.Which makes it it to 276+10=286

Shubham Dwivedi
Nov 16, 2014

use n(aUbUc)= n(a)+n(b)+n(c)-n(aUb)-n(bUc)-n(aUc)+n(aUbUc)

The Python Code :

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...