Maths Olympiad Prep

Library / /7 of 14

Number theory Difficulty 5.6 AIME, harder Prove it Singapore

Find all positive integers m,nm, n satisfying n!+2n1=2mn! + 2^{n-1} = 2^m.

Solution

We first check that n=1,2,4n = 1, 2, 4 are solutions among n4n \le 4, with m=1,2,5m = 1, 2, 5 respectively.

We now assume that n5n \ge 5. By Legendre's formula, we know that v2(n!)=ns2(n)v_2(n!) = n - s_2(n) where s2(n)s_2(n) is the number of non-zero digits in the binary representation of nn. Thus v2(n!)n1v_2(n!) \le n - 1.

If v2(n!)=a<n1v_2(n!) = a < n - 1, letting odd(xx) denote the odd part of xx, we have
odd(n!)+2n1a=2ma \mathrm{odd}(n!) + 2^{n-1-a} = 2^{m-a}
which cannot happen as odd(n!)\mathrm{odd}(n!) is odd and the other two terms are even. Hence v2(n!)=n1v_2(n!) = n - 1 and we must have s2(n)=1ns_2(n) = 1 \Rightarrow n is a power of 2.

Let n=2an = 2^a. Then a3a \ge 3. We claim that odd(n!)3(mod8)\mathrm{odd}(n!) \equiv 3 \pmod 8. To see so, we pair up ii with ni=2ain-i = 2^a-i. If v2(i)<a2v_2(i) < a-2, then odd(2ai)odd(i)(mod8)\mathrm{odd}(2^a-i) \equiv -\mathrm{odd}(i) \pmod 8 and so we have
odd(i)odd(2ai)odd(i)21(mod8) \mathrm{odd}(i) \cdot \mathrm{odd}(2^a - i) \equiv -\mathrm{odd}(i)^2 \equiv -1 \pmod 8
and we have an even number of such pairs. This gives us a product of 1. The remaining ii's are of simply 2a2,2a12^{a-2}, 2^{a-1} and 32a23 \cdot 2^{a-2}, whose odd part multiply to 3 mod 8. Hence the total product is 3 mod 8 as desired. Then
n!+2n1=2modd(n!)+1=2mn12mn14(mod8)2mn14 n! + 2^{n-1} = 2^m \Rightarrow \mathrm{odd}(n!) + 1 = 2^{m-n-1} \Rightarrow 2^{m-n-1} \equiv 4 \pmod 8 \Rightarrow 2^{m-n-1} \le 4
Thus odd(n!)4\mathrm{odd}(n!) \le 4 which leads to n4n \le 4. So there are no other solutions.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic and difficulty added by this site.