TITLE: Prove $(8k)^{8k}+(8k+1)^{8k+1}$ and $(8k+1)^{8k+1}+(8k+2)^{8k+2}$ are never perfect squares
QUESTION [6 upvotes]: Prove $$(8k)^{8k}+(8k+1)^{8k+1}\ \ \text{ and } \ \ \ (8k+1)^{8k+1}+(8k+2)^{8k+2}$$ are never perfect squares ($k\ge 1$).    

mod $8$ gives $1$ for both, which is a quadratic residue, so doesn't solve it. Found in AoPS.

REPLY [5 votes]: We can say something a bit stronger. For $n$ a positive integer, $n^n+(n+1)^{n+1}$ cannot be a perfect square if $n$ is even or $n\equiv 1 \pmod{4}$.
For even $n$ assume $n=2x>0$ and
$$
(2x)^{2x}+(2x+1)^{2x+1}=u^2 \\
(2x+1)^{2x+1} = (u-(2x)^x)(u+(2x)^x)
$$
Let $A=u-(2x)^x,B=u+(2x)^x$ and $g=\gcd(A,B)$. Then
$$
g\mid B-A=2(2x)^x \\
g\mid (2x+1)^{2x+1} \\
\implies
g \mid \gcd\left(2(2x)^x,(2x+1)^{2x+1}\right)=1
$$
So $A,B$ have no common factor and $AB=(2x+1)^{2x+1}$ so we must have $A=a^{2x+1},B=b^{2x+1}$ for odd positive integers $a,b$ with $b\ge a+2$ and $ab=2x+1$. Then
$$
\begin{align}
2(2x)^x &= b^{2x+1}-a^{2x+1} \\
&= (b-a)\left(b^{2x}+b^{2x-1}a+\cdots+ba^{2x-1}+a^{2x}\right) \\
&> (b-a)(2x+1)(ab)^x && \text{by AM-GM} \\
&> 2(2x)^x
\end{align}
$$
a contradiction, so this is not possible with $n$ even.
For $n=1$ it is easily confirmed that $1^1+2^2=5$ is not a square.
For $1<n\equiv 1 \pmod 4$ assume $n=2x-1, x>2$ and
$$
(2x-1)^{2x-1}+(2x)^{2x}=u^2 \\
(2x-1)^{2x-1} = (u-(2x)^x)(u+(2x)^x)
$$
As before let $A=u-(2x)^x,B=u+(2x)^x$ and it follows that $\gcd(A,B)=1$, $A=a^{2x-1},B=b^{2x-1}$ for odd positive integers $a,b$ with $ab=2x-1=n$. Since $n\equiv 1\pmod{4}$, $a\equiv b \pmod{4}$ and so $b\ge a+4$.
Then
$$
\begin{align}
2(2x)^x &= b^{2x-1}-a^{2x-1} \\
&= (b-a)\left(b^{2x-2}+b^{2x-3}a+\cdots+ba^{2x-3}+a^{2x-2}\right) \\
&> (b-a)(2x-1)(ab)^{x-1} \\
&\ge 4(2x-1)^x \\
&=4(2x)^x\left(1-\frac{1}{2x}\right)^x \\
&> 2(2x)^x
\end{align}
$$
where the last step follows from $\left(1-\frac{1}{2t}\right)^t>\frac{1}{2}$ for all $t>1$ and the assumption $x>2$. Again we reach a contradiction, so it is not possible for numbers of this form to be perfect squares when $n\equiv 1 \pmod 4$.