# Solve $x^2 = 2^n + 3^n + 6^n$ over positive integers.

Solve $x^2 = 2^n + 3^n + 6^n$ over positive integers.

I have found the solution $(x, n) = (7, 2)$. I have tried all $n$'s till $6$ and no other seem to be there.

Taking $\pmod{10}$, I have been able to prove that if $4|n$ that this proposition does not hold. Can you give me some hints on how to proceed with this problem?

Thanks.

• A somewhat obvious one $$2^n+3^n+6^n \equiv 3 \pmod 4$$ if $n$ is a odd value larger than $3$. Thus it is impossible for odd numbers as well. – S.C.B. Apr 13 '16 at 10:11
• @Dhruv, no perfect squares up to $n=200$. Or up to $n=300$ either. – Yuriy S Apr 13 '16 at 10:14
• The given equation is equivalent to $$(2^n+1)(3^n+1)=x^2+1$$. Modulo $3$, we also see that $n$ must be even because of $2^n\equiv (-1)^n$. – Peter Apr 13 '16 at 12:35
• For $n\in [0,10^5]$, there is no other solution than $n=2$. – Peter Apr 13 '16 at 12:38
• @Peter Make that $10^6$ – Charlie Apr 13 '16 at 19:10

## 1 Answer

If $n=2k+1\ge 3$, then $x^2\equiv 3\mod 4$.
If $n=2k\ge 4$, then $(x+2^k)(x-2^k)=x^2-2^{2k}=6^{2k}+3^{2k}=3^{2k}(1+2^{2k})$.
We have $\gcd (x-2^k, x+2^k)=1$, then $x+2^k\ge 3^{2k} \Rightarrow x-2^k\ge 3^{2k}-2^{2k+1}>2^{2k}+1$.

• Sorry for the late reply. So the proof relies on the fact that $3^{2k}$ and $2^{2k}+1$ are relatively prime? – TheRandomGuy Apr 15 '16 at 9:26
• No! i don't use this fact. I use that $(x-2^k)$ and $(x+2^k)$ approximatly equal, but only one can be divided by 3. – Mikhail Ivanov Apr 15 '16 at 12:34
• Doesn't it mean the same? They are relatively prime implies that $3$ does not divide $1+2^{2k}$. So, it means that exactly one of $x\pm 2^k$ is divisible by 3. Since, one value of the RHS is equal to one of the LHS – TheRandomGuy Apr 15 '16 at 14:07
• @Dhruv If $3\mid x-2^k$, then $3^{2k}\mid x-2^k$ because $x-2^k, x+2^k$ are coprime, so $x-2^k\ge 3^{2k}>1+2^{2k}\ge x+2^k$, contradiction. Therefore $3\mid x+2^k$, so $3^{2k}\mid x+2^k$, so $x+2^k\ge 3^{2k}$, so $x-2^k\ge 3^{2k}-2^{k+1}>1+2^{2k}$, so $\left(x+2^k\right)\left(x-2^k\right)>3^{2k}\left(1+2^{2k}\right)$, contradiction. – user236182 Apr 16 '16 at 7:55
• @user236182 Thanks. I got it. – TheRandomGuy Apr 16 '16 at 8:30