<s>[INST] On equations $m^2+1=5^n$ I am looking for integer solutions of Diophantine equation $m^2+1=5^n$. I found that $m=0,n=0$ and $m=2,n=1$. I could not find any other solutions. I try to prove this but I could not. Could anyone help me to solve this equation?
 [/INST] HINT.-If you are interested in another way of indicated in the link given by Yiyuan Lee (a good example of that elementary could be intricate enough and not easy), you could pay attention to the following:
$m^2+1=5^n\Rightarrow n$ is odd ($m^2+1=x^2$ is impossible since the difference between $x^2$ and the square of an integer greater than $x$ is always greater or equal than $2x+1>1$).
So we have the equation $$m^2+1=5x^2\iff m^2-5x^2=-1\quad (*)$$
The Pell-Fermat equation $(*)$ has infinitely many solutions but we have to discriminate these solutions with the restriction $x$ must be a power of $5$.
It is known in Algebraic Number Theory (it is not hard to calculate) that the fundamental unit of $\mathbb Q[\sqrt 5]$ is $\frac{ 1+\sqrt 5}{2}$ so all the solutions $(m_n,x_n)$  of $(*)$ are given by
$$m_k+x_k\sqrt 5=\left(\frac{ 1+\sqrt 5}{2}\right)^k; k\ge 1\qquad (**)$$
Calculation gives
$$2^k(m_k+x_k\sqrt 5)=(1+\sqrt 5)^k=1+\binom k1\sqrt 5+\binom k2(\sqrt 5)^2+\binom k3(\sqrt 5)^4+…..+\binom k2(\sqrt 5)^{k-2}+\binom k1(\sqrt 5)^{k-1}+(\sqrt 5)^k$$ 
Hence you have according if $k$ is even or odd
$$2^{2k}x_{2k}=\binom {2k}1+5\binom {2k}3+5^2\binom {2k}5+5^3\binom {2k}7+…..5^{k-1}\binom {2k}1$$
$$2^{2k+1}x_{2k+1}=\binom {2k+1}1+5\binom {2k+1}3+5^2\binom{2k+1}5+5^3\binom {2k+1}7+…..+5^{k-1}\binom {2k+1}2+5^k$$
I leave to you the task of verifying that it is not possible that any $x_k$ is a power of $5$.
</s>