1
4.3kviews
How many integers between 1 to 2000 are divisible by 2, 3, 5 or 7?
1 Answer
1
391views

Solution:

Suppose set A denotes the number of integers between 1 to 2000 divisible by 2.

Set B is the number of integers between 1 and 2000 divisible by 3.

Set C is the number of integers between 1 and 2000 divisible by 5.

Set D is the number of integers between 1 and 2000 divisible by 7.

|A|=[20002]=1000

|B|=[20003]=666

|C|=[20005]=400

|D|=[20007]=285

|AB|=[20002×3]=333

|AC|=[20002×5]=200

|AD|=[20002×7]=142

|BC|=[20003×5]=133

|BD|=[20003×7]=95

|CD|=[20005×7]=57

|ABC|=[20002×3×5]=66

|ABD|=[20002×3×7]=47

|ACD|=[20902×5×7]=28

|BCD|=[20903×5×7]=19

|ABCD|=[20002×3×5×7]=9

Number of elements divisible by 2 or 3 or 5 or 7 are |ABCD|.

From inclusion-exclusion principle

|ABCD|=|A|+|B|+|C|+|D|||AB|+|BC|+|AC|+|AD|+|BD|+|CD]+||ABC|+|ABD|+|ACD|+|BCD]||ABCD]|ABCD|=1000+666+400+285[333+200+142+133+95+57]+[66+47+28+19]9=2351960+1609=1542

Please log in to add an answer.