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?

Note $x^2-y^2=(x+y)(x-y)$ so both of these must be factors of $5^{29}$, i.e. powers of $5$.
Let $x+y=5^a$ for some $0 \leq a \leq 29$. Then by the factorisation above, $x-y=5^{29-a}$ and this always has a solution in rational numbers, namely $x=\frac{5^a+5^{29-a}}{2}$, $y=\frac{5^a-5^{29-a}}{2}$.
We do require these to be integers, but this is always true as $5^k$ is always odd and odd+odd=even.
The only other restriction is that they are positive and whilst $x$ necessarily is, $y$ will only be positive when $29-a \leq a$, i.e. $a>14$. Hence any $15 \leq a \leq 29$ works and we have $15$ solutions.
Note that in general factorisations, we could have had $x+y=-5^a$, $x-y=-5^{29-a}$, but this is not allowed as both $x$ and $y$ are positive.
