Should I look the other way around?

How many positive integers less than or equal to 60 are divisible by 3, 4, or 5?


The answer is 36.

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.

2 solutions

Alex Li
Jun 18, 2015

We use PIE to count the number of integers: A B C = A + B + C A B A C B C + A B C |A\cup B\cup C|=|A|+|B|+|C|-|A\cap B|-|A\cap C|-|B\cap C|+|A\cap B\cap C|

= 60 3 + 60 4 + 60 5 60 12 60 15 60 20 + 60 60 =\lfloor{\frac{60}{3}}\rfloor+\lfloor{\frac{60}{4}}\rfloor+\lfloor{\frac{60}{5}}\rfloor-\lfloor{\frac{60}{12}}\rfloor-\lfloor{\frac{60}{15}}\rfloor-\lfloor{\frac{60}{20}}\rfloor+\lfloor{\frac{60}{60}}\rfloor

= 20 + 15 + 12 5 4 3 + 1 = 36 =20+15+12-5-4-3+1=\boxed{36}

You remove those dividing 12, 15 & 20.

60 can be divided by 12, 15 or 20, therefore removed 3 times.

You add 60 (or corresponding 1) only once. It must be added twice.

Another ambiquity: do you account for 0 as divizible by any positive integer? If yes, you have to add it.

My answers: 38 or 37 if you ignore zero.

Arkadi Kagan - 2 years, 9 months ago

Log in to reply

The question asks for positive integers divisible by 3, 4 or 5. 0 is not a positive integer, so it doesn't fit the requirements.

As for the rest: let's see what happens for positive integers less than or equal 30 divisible by 2, 3 and 5.

2 -> {2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30}, 15 numbers.

3 -> {3, 6, 9, 12, 15, 18, 21, 24, 27, 30}, 10 numbers.

5 -> {5, 10, 15, 20, 25, 30}, 6 numbers.

If we sum the totals we get 31, but we counted twice numbers appearing twice, like 10, and thrice numbers appearing three times, like 30 (well, only 30 is like this).

So, what numbers did we count at least twice?

2, 3 -> {6, 12, 18, 24, 30}, 5 numbers.

2, 5 -> {10, 20, 30}, 3 numbers.

3, 5 -> {15, 30}, 2 numbers.

If we sum the totals we get 10, but we counted 30 thrice. So if we take the previous sum, 31 (which counts some numbers just twice, and one thrice) and we take away 10 (which counts the twicers once, and the thricer thrice), we get 21 (which counts everything once, except 30 which is not counted at all, since thrice-thrice= never)

So the answer we are seeking is 21+1=22. in fact, it's the size of this set:

{2, 3, 4, 5, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30}

Which is the set of positive integers less than or equal to 30 divisible by 2, 3 or 5.

Did I go wrong somewhere?

Samuele Zardo - 2 years, 9 months ago

Alex is correct. Also u don't account for 0 since the question clearly states all positive integers, which 0 is unequivocally not a part of.

jani love - 2 years, 1 month ago

Instead of using the greatest integer function or the floor function, we can also use Arithmetic Progression to find the number of terms <= 60 divisible by 3,4,5,12,15,20 and 60 individually but it will be a lengthier method.

Tisya Rawat - 5 months ago
Mbe Najem Joy
Dec 17, 2019

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...