Gonna Need A Big Chalkboard

A student randomly chooses m m distinct numbers from among the first 2017 positive integers and writes them all on a chalkboard.

She then chooses two of the numbers written on the chalkboard, erases them both, and writes down their least common multiple. She repeats this process until only one number remains on the chalkboard.

What is the smallest integer m m such that the final number is guaranteed to be a multiple of 128?

It may be helpful to note that 128 = 2 7 128=2^{7} and 2017 is prime.

An example of the process with \(m=4.\) An example of the process with m = 4. m=4.


Bonus: Can you come up with a simple formula for the smallest m m such that the final number is a multiple of n n , where n n is a positive integer?


The answer is 2003.

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

Ivan Koswara
Aug 26, 2017

Relevant wiki: Lowest Common Multiple

Observe that lcm { a , b , c } = lcm { lcm { a , b } , c } \text{lcm} \{a, b, c\} = \text{lcm} \{ \text{lcm} \{a, b\}, c\} ; in other words, the final result doesn't depend on the order we take the LCMs, because they commute. Thus the final LCM is wholly determined by the numbers we pick initially.

There are 15 multiples of 128 below 2017. If we don't take any of them, then the LCM cannot be a multiple of 128, since the highest power of 2 that divides the LCM would be 64. (Remember that in order to have the LCM divisible by 2 7 = 128 2^7 = 128 , one of the numbers must be a multiple of 2 7 = 128 2^7 = 128 . This would be different if the LCM had to be divisible by a non-prime power, such as 6; in that case, we need one number divisible by 2, and another (not necessarily different) divisible by 3; we don't necessarily need a number that is divisible by both 2 and 3 simultaneously. Note also that this would be different had the LCM been "product".)

Since we can skip 15 numbers and have LCM that is not a multiple of 128, we need to take at least one of these numbers. That gives 2017 15 + 1 = 2003 2017 - 15 + 1 = \boxed{2003} numbers that we need to take. This is clearly enough; taking 2003 numbers will require us to take some multiple of 128, because otherwise there are only 2002 numbers available.

Really clever solution. Could you explain why you added 1? 2017-15+1? Also, I didn't understand the argument of the non-prime power. Are you considering 2^6? What follows doesn't make so much sense to me given that. Thank you!

Sean Thrasher - 3 years, 9 months ago

Log in to reply

He added 1 because you can choose(max) 2002 numbers that don't include a multiple of 128. So, choosing 2003 numbers is bound to include a multiple of 3.

Ojas Singh Malhi - 3 years, 9 months ago

Let's simplify the problem to { 1 , 2 , 3 , , 10 } \{1, 2, 3, \ldots, 10\} . We consider two cases: where the LCM is a multiple of 4 (prime power), and a multiple of 6 (not prime power).

In order for the LCM to be a multiple of 4, we need to include at least one multiple of 4. There are two such numbers: 4 and 8. If we only take 8 numbers, it's possible that we miss both, taking 1, 2, 3, 5, 6, 7, 9, 10, whose LCM 630 is not a multiple of 4. So we need to take 9 numbers to guarantee taking 4 or 8. (This also answers your question about adding 1.)

However, in order for the LCM to be a multiple of 6, the question is different. It's not necessary to include a multiple of 6; we only need to include a multiple of 2 and a multiple of 3. For example, if we take 8 and 9, even though neither of them is a multiple of 6, their LCM 72 is still a multiple of 6. As it turns out, the answer here is 8: if we take 7 numbers, we can skip multiples of 3 (taking 1, 2, 4, 5, 7, 8, 10 with LCM 280, not a multiple of 6), so we need to take 8 numbers. If we tried doing like above, we would take all 10 numbers, since taking only 9 numbers might skip the 6; but as it turns out, skipping the 6 will still leave LCM that's divisible by 6.

Ivan Koswara - 3 years, 9 months ago

So formula becomes m=2017 - floor(2017/n) +1 right?

Yash Ghaghada - 3 years, 9 months ago

Log in to reply

That is correct if n n is a prime power. In general, if n = p 1 e 1 p 2 e 2 p k e k n = p_1^{e_1} p_2^{e_2} \ldots p_k^{e_k} , look at p 1 e 1 , p 2 e 2 , , p k e k p_1^{e_1}, p_2^{e_2}, \ldots, p_k^{e_k} . Take the largest among them all, say m m ; then the answer is 2017 2017 m + 1 2017 - \lfloor \frac{2017}{m} \rfloor + 1 if m 2017 m \le 2017 (and it's impossible otherwise).

Ivan Koswara - 3 years, 9 months ago
Jason Martin
Sep 4, 2017

Relevant wiki: Lowest Common Multiple

If x 1 , x 2 , x 3 , , x m x_1, x_2, x_3, \ldots , x_m are the m m randomly chosen positive integers, then this process merely calculates l c m ( x 1 , x 2 , x 3 , , x m ) lcm(x_1, x_2, x_3, \ldots , x_m) . Set L = l c m ( x 1 , x 2 , x 3 , , x m ) L=lcm(x_1, x_2, x_3, \ldots , x_m) .

Then we are looking for the smallest m m such that 128 128 necessarily divides L L . Since the x i x_i are randomly chosen, m m must be large enough to exhaust all non-multiples of 128 128 . Since there are 2017 128 = 15 \lfloor\frac{2017}{128} \rfloor=15 multiples of 128 128 , we know there are 2002 2002 non-multiples. Therefore, the smallest m m is 2003 2003 .

Very clean and straightforward presentation, indeed.

Agnishom Chattopadhyay - 3 years, 9 months ago
Brandon Monsen
Aug 24, 2017

Relevant wiki: Lowest Common Multiple

Let the final number be F F and the n t h n^{th} chosen number be written in the form a n × 2 b n a_{n} \times 2^{b_{n}} where a n , b n a_{n},b_{n} are integers and b n b_{n} is as large as possible. This implies that a n a_{n} is odd, since if it were even, b n b_{n} is not maximized.

Now, taking the least common multiple of two of these numbers, call them x = p × 2 j x=p \times 2^{j} and y = q × 2 k y=q \times 2^{k} , will give us L C M ( x , y ) = L C M ( p , q ) × 2 max ( j , k ) LCM(x,y)=LCM(p,q) \times 2^{\max(j,k)} . Since p , q p,q are both odd, their least common multiple will be odd and thus has no impact on divisibility by 128 = 2 7 128=2^{7} .

Hence, for 128 F 128|F , we must have max ( b 1 , b 2 , b 3 , . . . , b m ) 7 \max(b_{1},b_{2},b_{3},...,b_{m}) \geq 7 . In other words, 128 F 128|F if and only if any of the chosen numbers are a multiple of 128 128 .

There are 15 15 positive multiples of 128 128 less than 2017 2017 (we know this because 128 ( 2048 128 ) = 15 × 2 7 128|(2048-128)=15 \times 2^{7} ) and so we can choose all but 15 15 of the possible numbers without forcing the condition to be met. Hence, we can choose 2002 2002 but not 2003 \boxed{2003} .

Jens Schriwer
Sep 8, 2017

Bonus: m = 2017 2017 n m = 2017 - \lfloor\frac{2017}{n}\rfloor + 1

Careful! This is true when n n is of the form p q p^{q} where p p is prime and q q is a positive integer.

Think about what happens when we have n = 6 n=6 . If we chose 2 2 and 3 3 , then their LCM is 6 6 and it would be divisible, but your equation only takes into account how many direct multiples of 6 6 there are less than 2017 2017 . We would have to look into multiples of 2 and 3 as well.

Brandon Monsen - 3 years, 9 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...