All about divisibility and counting

How many positive integers from 1 to 8644 inclusive are divisible by EXACTLY TWO of 2,3 and 5?


The answer is 2016.

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.

1 solution

Otto Bretscher
Dec 20, 2015

I used a "low tech" approach: We count seven such numbers <30, and then the pattern is repeated 288 times up to 30 × 288 = 8640 30\times288=8640 , for a grand total of 7 × 288 = 2016 7\times 288=\boxed{2016} . Happy 2016!

Haha Yes, that is much simpler than my "high tech" approach ....

Let N ( k ) N(k) be the number of integers between 1 1 and 8644 8644 inclusive divisible by k . k.

Then the desired value is N ( 2 3 ) + N ( 2 5 ) + N ( 3 5 ) 3 N ( 2 3 5 ) = N(2*3) + N(2*5) + N(3*5) - 3*N(2*3*5) =

8644 6 + 8644 10 + 8644 15 3 8644 30 = 1440 + 864 + 576 3 288 = 2016. \lfloor\dfrac{8644}{6}\rfloor + \lfloor\dfrac{8644}{10}\rfloor + \lfloor\dfrac{8644}{15}\rfloor - 3*\lfloor\dfrac{8644}{30}\rfloor = 1440 + 864 + 576 - 3*288 = 2016.

The reason we subtract 3 N ( 30 ) 3*N(30) is that N ( 30 ) N(30) is "nested" in each of N ( 6 ) , N ( 10 ) N(6), N(10) and N ( 15 ) , N(15), so since we wish to exclude integers divisible by 2 3 5 = 30 2*3*5 = 30 we need to subtract this value three times from the sum of the other N N values.

Brian Charlesworth - 5 years, 5 months ago

Log in to reply

In German we call this "mit Kanonen auf Spatzen schiessen" ;) Merry Christmas, Brian! More fun in 2016!

Otto Bretscher - 5 years, 5 months ago

Log in to reply

Hahaha Yes, it is indeed a "sledgehammer" approach, but it did crack the nut, (I relied on my niece for the translation, (she's the linguist in the family), so I hope that was the correct interpretation). :) Merry Christmas to you too, Dr. Bretscher, and may 2016 be full of good will and good math!

Brian Charlesworth - 5 years, 5 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...