A student randomly chooses 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 such that the final number is guaranteed to be a multiple of 128?
It may be helpful to note that 1 2 8 = 2 7 and 2017 is prime.
Bonus: Can you come up with a simple formula for the smallest m such that the final number is a multiple of n , where n is a positive integer?
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.
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!
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.
Let's simplify the problem to { 1 , 2 , 3 , … , 1 0 } . 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.
So formula becomes m=2017 - floor(2017/n) +1 right?
Log in to reply
That is correct if n is a prime power. In general, if n = p 1 e 1 p 2 e 2 … p k e k , look at p 1 e 1 , p 2 e 2 , … , p k e k . Take the largest among them all, say m ; then the answer is 2 0 1 7 − ⌊ m 2 0 1 7 ⌋ + 1 if m ≤ 2 0 1 7 (and it's impossible otherwise).
Relevant wiki: Lowest Common Multiple
If x 1 , x 2 , x 3 , … , x m are the m randomly chosen positive integers, then this process merely calculates l c m ( x 1 , x 2 , x 3 , … , x m ) . Set L = l c m ( x 1 , x 2 , x 3 , … , x m ) .
Then we are looking for the smallest m such that 1 2 8 necessarily divides L . Since the x i are randomly chosen, m must be large enough to exhaust all non-multiples of 1 2 8 . Since there are ⌊ 1 2 8 2 0 1 7 ⌋ = 1 5 multiples of 1 2 8 , we know there are 2 0 0 2 non-multiples. Therefore, the smallest m is 2 0 0 3 .
Very clean and straightforward presentation, indeed.
Relevant wiki: Lowest Common Multiple
Let the final number be F and the n t h chosen number be written in the form a n × 2 b n where a n , b n are integers and b n is as large as possible. This implies that a n is odd, since if it were even, b n is not maximized.
Now, taking the least common multiple of two of these numbers, call them x = p × 2 j and y = q × 2 k , will give us L C M ( x , y ) = L C M ( p , q ) × 2 max ( j , k ) . Since p , q are both odd, their least common multiple will be odd and thus has no impact on divisibility by 1 2 8 = 2 7 .
Hence, for 1 2 8 ∣ F , we must have max ( b 1 , b 2 , b 3 , . . . , b m ) ≥ 7 . In other words, 1 2 8 ∣ F if and only if any of the chosen numbers are a multiple of 1 2 8 .
There are 1 5 positive multiples of 1 2 8 less than 2 0 1 7 (we know this because 1 2 8 ∣ ( 2 0 4 8 − 1 2 8 ) = 1 5 × 2 7 ) and so we can choose all but 1 5 of the possible numbers without forcing the condition to be met. Hence, we can choose 2 0 0 2 but not 2 0 0 3 .
Bonus: m = 2 0 1 7 − ⌊ n 2 0 1 7 ⌋ + 1
Careful! This is true when n is of the form p q where p is prime and q is a positive integer.
Think about what happens when we have n = 6 . If we chose 2 and 3 , then their LCM is 6 and it would be divisible, but your equation only takes into account how many direct multiples of 6 there are less than 2 0 1 7 . We would have to look into multiples of 2 and 3 as well.
Problem Loading...
Note Loading...
Set Loading...
Relevant wiki: Lowest Common Multiple
Observe that lcm { a , b , c } = lcm { 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 = 1 2 8 , one of the numbers must be a multiple of 2 7 = 1 2 8 . 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 2 0 1 7 − 1 5 + 1 = 2 0 0 3 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.