Does there exist $n\in\mathbb{N}$ such that $5^n-2^n$ is a perfect square?

293 Views Asked by At

I checked up to $n\leq 100000$ then found no example. So I suspect that there doesn't exist $n\in\mathbb{N}$ such that $5^n-2^n$ is a perfect square.
Then I tried to prove by modular arithmetic, but there seems no $k$ such that $\{5^n-2^n \bmod k \mid n\in\mathbb{N}\}\cap\{n^2\bmod k\mid n\in\mathbb{N}\}=\emptyset$.
Thank you for your help.

3

There are 3 best solutions below

1
On BEST ANSWER

Checking things modulo $5$ you can see that $n$ has to be even, as $2$ is not a square (and hence so are all odd powers). So say $n = 2m$. Then we can write $$5^n - 2^n = 5^{2m} - 2^{2m} = (5^m - 2^m)(5^m + 2^m).$$

Assume there exist $n$ such that we get perfect squares here. Then there is a minimal such $n$, that (due to laziness) we will in the following simply call $n$. Any prime that divides $5^n - 2^n$ must divide it to an even power of at least two (quickly exclude the case $5^n - 2^n = 1$ for completeness sake please). But if all these primes also divide $5^m - 2^m$ to an even power, then $5^m - 2^m$ is also a perfect square, a contradiction to the assumption that $n$ is minimal.
That means that there must exist a prime divisor $p$ of $5^n - 2^n$ that divides both $5^m - 2^m$ and $5^m + 2^m$. But then $p$ also divides the difference of the two, which is $2^{m+1}$, so $p = 2$.

But $5^n - 2^n$ is always odd, so $p = 2$ is not possible. Hence, we have found a contradiction to the assumption that any such $n$ exists.

0
On

If $n$ is odd and greater than $1$ then $5^n-2^n\equiv 5\pmod{8}$, so it cannot be a square. If $n$ is even then $5^{2m}-2^{2m}=a^2$ leads to a primitive Pythagorean triple $(a,2^m,5^m)$. Since $\mathbb{Z}[i]$ is a UFD all the primitive Pythagorean triples involving a power of $5$ as greatest element depend on the real and imaginary part of $(2+i)^{2m}$. The real part is always odd, while the imaginary part $a_m=\text{Im }(2+i)^{2m}$ fulfills $$ a_{m+2} = 6a_{m+1}-25 a_{m} $$ such that $$ \nu_2(a_m)\leq \nu_2(m)+1. $$ It follows that, apart from the first cases, which can be checked by hand, $a_m$ cannot be equal to $2^m$ and there is no square of the form $5^n-2^n$.

8
On

One might note that $5^n-2^n$ is a base, and every new value of $n$ brings a new prime, previously not before seen. If some prime $p$ divides $5^n-2^n$ then it divides $5^{pn}-2^{pn}$ an additional time.

So $5-2=3$ which is not square. So we replace $n$ with $3n$, to get $5^3-2^3 = 3^2 13$. But the 13 is not square, so we have to replace $n$ with $13n$. Here we now introduce two very large coprime numbers, of which the larger is a multiple of 13.

It runs away as a power of exponentials.