Maths Olympiad Prep

Library / /44 of 120

Number theory Difficulty 5.0 AIME, harder Prove it Saudi Arabia

Find all positive integers nn such that 27n2n27^{n}-2^{n} is a perfect square.

Solutions — 2

Solution 1

For n=1n=1 we have 272=25=5227-2=25=5^{2}. We will prove that there are no other positive integers with this property.
If nn is odd, n=2k+1n=2k+1, then
27n2n=272k+122k+1=(281)2k+124k=4m+(1)2k+1=4m1 \begin{aligned} 27^{n}-2^{n} &= 27^{2k+1}-2^{2k+1} = (28-1)^{2k+1}-2 \cdot 4^{k} \\ &= 4m+(-1)^{2k+1} = 4m-1 \end{aligned}
It is easy to see that integers of the form 4m14m-1 are not perfect squares.
If nn is even, n=2kn=2k, then 27n2n=(27k)222k27^{n}-2^{n} = (27^{k})^{2} - 2^{2k}, and we have
(27k1)2<(27k)222k<27k, (27^{k}-1)^{2} < (27^{k})^{2} - 2^{2k} < 27^{k},
hence 272k22k27^{2k}-2^{2k} is between two consecutive perfect squares, that is it cannot be a perfect square. The only solution is n=1n=1.

Solution 2

(Wael Hussain Al Saeed) Assume that n2n \geq 2. For any integer xx, we have x20,1(mod3)x^{2} \equiv 0,1 \pmod{3} and x20,1(mod4)x^{2} \equiv 0,1 \pmod{4}. Considering the relation 27n2n=x227^{n}-2^{n}=x^{2} modulo 3 we get
27n2n(1)n+1(mod3) 27^{n}-2^{n} \equiv (-1)^{n+1} \pmod{3}
hence (1)n+11(mod3)(-1)^{n+1} \equiv 1 \pmod{3}. It follows n=2k+1n=2k+1 for some positive integer kk.
Considering the relation 27n2n=x227^{n}-2^{n}=x^{2} modulo 4 we obtain
(1)nx2(mod4) (-1)^{n} \equiv x^{2} \pmod{4}
hence (1)n1(mod4)(-1)^{n} \equiv 1 \pmod{4}, that is n=2mn=2m for some positive integer mm, not possible.

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.