Find all integers $m \geqslant 1$ and $n \geqslant 1$ such that $\frac{5^{m}+2^{n+1}}{5^{m}-2^{n+1}}$ is the square of an integer.
The following demonstration is valid for $m, n \in \mathbb{N}$.
First, $5^{m}-2^{n+1}$ must divide $5^{m}+2^{n+1}$, so it divides $5^{m}+2^{n+1}-(5^{m}-2^{n+1})=2^{n+2}$, therefore it is a power of 2. However, $5^{m}-2^{n+1}$ is odd, so $5^{m}-2^{n+1}=1$.
Let's write $5^{m}+2^{n+1}=a^{2}$. We then have $(a-1)(a+1)=a^{2}-1=5^{m}+2^{n+1}-5^{m}+2^{n+1}=2^{n+2}$, so $a-1$ and $a+1$ are powers of 2.
Let's write $a-1=2^{c}$ and $a+1=2^{d}$ with $c+d=n+2$. Then $c<d$ so $a-1=2^{c}$ divides $2^{d}-2^{c}=(a+1)-(a-1)=2$, thus $a-1=1$ or $a-1=2$.
If $a=2$ then $2^{d}=a+1=3$, which is impossible.
We deduce that $a=3, c=1, d=2$ and $n+2=3$, which gives $n=1$ and $5^{m}=1+2^{n+1}=5$, then $m=1$.
Finally, $m=n=1$.