Can $5^n+1$ be sum of two squares? I want to determine whether or not $5^n+1$ , $n\in\mathbb{N}$ can be written as sum of two squares.
Obviously, the real problem is when $n$ is odd. I am aware of the known results about numbers written as sum if squares, but I couldn't apply them here. We can see that when $n$ is odd, $5^n+1$ ia divisible by 6 and gives reminder 2 when divided by 4 which means that the two squares we would have to add must end in 1 and 9 or 5 and 5.

Say $x^2 + y^2 = 5^n + 1$.
Looking mod 2, we get that $x^2 + y^2 = 0 \mod 2$, so $x$ and $y$ have the same parity, and looking mod 4, we get that $x^2 + y^2 = 2 \mod 4$, so $x$ and $y$ must both be odd.
Say $x = 2r + 1$ and $y = 2s+ 1$, so $$x^2 + y^2 = (2r + 1)^2 + (2s+1)^2 = 4(r^2 + r + s^2 + s) + 2 = 5^n + 1$$
or
$$4(r(r+1) + s(s+1)) = 5^n - 1$$
Now, the left side must be divisible by $8$, so $n$ must be even.
