<s>[INST] How many solutions does the equation $x^2-y^2=5^{29}$ have, given that $x$ and $y$ are positive integers? 
How many solutions does the equation $x^2-y^2=5^{29}$ have, given that $x$ and $y$ are positive integers?

Someone told me that it has $(29+1)/2=15$ solutions. How come? Any other method to solve this?
 [/INST] First, factorise :
$$x^2-y^2=(x-y)(x+y)=5^{29}.$$
Then by the Fundamental Theorem of Arithmetics, both factors must be powers of $5$, i.e.
$$\left\{\begin{array}{}x+y & = & 5^a \\ x-y & = & 5^b,\end{array}\right.$$with $a+b=29$. Since $x+y>x-y$, we must have $a>b$; hence you will have one system for every $15\leq a\leq 29$. Since every system as above has a unique integer solution $$x=\frac{5^{a}+5^b}{2},\quad y=\frac{5^{a}-5^b}{2},$$
we obtain the $15$ solutions.
</s>