Why does it always have to be maximizing?

Maximize the value of m + n m+n where m m and n n are positive integers satisfying:

m 2 + 2 3 n = m ( 2 n + 1 1 ) m^2+2 \cdot 3^n=m(2^{n+1}-1)


Inspired by an IMO problem, but pretty much nothing like it, so Daniel Liu doesn't have to worry. :D


The answer is 59.

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

Marek Bernat
May 18, 2014

First rewrite the equation as m ( 2 n + 1 1 m ) = 2 3 n . m(2^{n+1} - 1 - m) = 2 \cdot 3^n. Suppose first that m is odd and therefore that m = 3 k m = 3^k for some k k . We then get 2 n + 1 1 3 k = 2 3 n k . 2^{n+1} - 1 - 3^k = 2 \cdot 3^{n-k}. On the other hand, if m were even then m = 2 3 l m = 2\cdot 3^l and so 2 n + 1 1 2 3 l = 3 n l . 2^{n+1} - 1 - 2 \cdot 3^l = 3^{n-l} . We observe that this is the same equation as for m m odd after letting l = n k l = n - k . Rewriting this a bit, we have 2 n + 1 1 = 3 a ( 2 3 b + 3 c ) , 2^{n + 1} - 1 = 3^a(2\cdot 3^b + 3^c), where 3 a 3^a is greatest common denominator of 3 k 3^k and 3 n k 3^{n-k} and b c = 0 bc = 0 .

Now fix a a and let us try to solve the equation 2 n + 1 1 ( m o d 3 a ) . 2^{n+1} \equiv 1 \pmod{3^a}. First observe what happens for small values of a a . If a = 1 a = 1 then it's enough that n + 1 n+1 be even. When a = 2 a = 2 , we get the sequence 2 , 4 , 8 1 , 2 , 4 , 1 2, 4, 8 \equiv -1, -2, -4, 1 , i.e. n + 1 n+1 must be a multiple of 6 6 . When a = 3 a = 3 , the sequence is 2 , 4 , 8 , 16 , 32 5 , 10 , 20 , 40 13 , 26 1 , , 20 , 13 , 1 2, 4, 8, 16, 32 \equiv 5, 10, 20, 40 \equiv 13, 26 \equiv -1, \dots, -20, -13, 1 having 18 terms in total, so that n + 1 n+1 must be divisible by 18. In general the length of the sequence divides 2 3 a 1 2 \cdot 3^{a-1} since that is the number of elements of Z / ( 3 a ) Z \mathbb Z / (3^a) \mathbb Z which are not divisible by 3 3 . I'm not sure how n n depends a a in general (and we will not be needing that result in what follows) but my guess is that it will be quite non-trivial and probably grow exponentially (i.e. n 3 a n \sim 3^a )

We will now show that k k is large whenever n n is. From the main equation we have 2 n 3 n k 2^{n} \geq 3^{n-k} and after taking logarithm n ( n k ) log 2 3 , n \geq (n-k) \log_2 3, so that k n ( log 2 3 1 ) / log 2 3. k \geq n (\log_2 3 - 1) / \log_2 3.

Realizing that m < 1000 m < 1000 we must have k 6 k \leq 6 and therefore from the above n 20 n \leq 20 , for which our analysis above implies a 3 a \leq 3 . Let us now investigate the cases.

When a = 3 a = 3 we must have n = 17 n = 17 . Therefore 2 n + 1 1 = 2 18 1 = 3 3 9709. 2^{n+1} - 1 = 2^{18} - 1 = 3^3 \cdot 9709 . Because 9709 9709 has remainder 1 after dividing by 3 we need that ( 9709 1 ) / 2 (9709 - 1) / 2 be a power of 3 3 which is not the case.

When a = 2 a = 2 we have n = 5 n=5 or n = 11 n = 11 . We get 2 6 1 = 63 = 3 2 7 2^6 - 1 = 63 = 3^2 \cdot 7 and 7 = 2 3 1 + 1 7 = 2\cdot 3^1 + 1 , so this one works with k = 3 k = 3 and we obtain m = 2 3 3 = 54 m = 2 \cdot 3^3 = 54 so that n + m = 59 n + m = 59 . For n = 11 n = 11 we get 2 12 1 = 4095 = 9 455 2^{12} - 1 = 4095 = 9 \cdot 455 . 455 455 has remainder 2 after dividing by 3, so that b = 0 b = 0 and 455 2 455 -2 would need to be a power of 3 3 . This is again not the case.

For a = 1 a=1 one can either check the cases by hand or simply realize that we can't get n n better than 20 20 or m m better than 2 3 1 = 6 2 \cdot 3^1 = 6 , so this would not beat our best result. So the final answer is 59 \bf 59 obtained from n = 5 \bf n = 5 , m = 54 \bf m = 54 in the case a = 2 a = 2 above.

Final remark: if we knew that the dependence of n n on a a was exponential, that alone would be enough to show that both n n and k k must be small (without the need to cheat by using that the result must be less than 1000).

Excellent! First solver and AMAZING solution.

Finn Hulse - 7 years ago

Log in to reply

My pleasure, I enjoyed solving it. So thanks for sharing.

Marek Bernat - 7 years ago

Log in to reply

Anytime! :D

Finn Hulse - 7 years ago

Also, would you mind making it more clear that the solution is ( 54 , 5 ) (54, 5) to the reader, because it's kind of buried among a bunch of confusing-looking LaTeX \LaTeX . Thanks! :D

Finn Hulse - 7 years ago

Log in to reply

True, done :)

Marek Bernat - 7 years ago

Log in to reply

Your solution assumes m < 1000 m < 1000 :(

Daniel Liu - 7 years ago

Log in to reply

@Daniel Liu Daniel you are so sad aren't you... D:

Finn Hulse - 7 years ago

@Daniel Liu Yeah, I know, sorry about that. I mentioned how to do it in general in the remark by analyzing the orbits of 2 2 in mod 3 a 3^a rings, but that's probably an overkill. I guess it should be possible to show that k k and n n must be small by some standard inequalities involving the equation. Or, by a different solution altogether. So looking forward to yours ;)

Marek Bernat - 7 years ago

Log in to reply

@Marek Bernat Unfortunately, I didn't really solve it all that legitimately. I didn't prove that my solution was the maximum.

Daniel Liu - 7 years ago

Actually if one knows all the of this problem, (aldready available,question is trivialws

A Former Brilliant Member - 6 years, 10 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...