How many solutions does the equation $x^2-y^2 = 3^8\cdot 5^6\cdot 13^4$ have? Given that $x$ and $y$ are positive integers. Problem: How many solutions does the equation $x^2-y^2 = 3^8\cdot 5^6\cdot 13^4$ have? Given that $x$ and $y$ are positive integers.

I tried a similar approach to the ones described here, but to no avail. I can't split up the RHS so that all the factors have the same base. 
 A: Factor
$$ (x+y)(x-y) = 3^8 \cdot 5^6 \cdot 13^4 $$
The number of ways to split up $3^8$ in a product is 9. The number of ways to split up $5^6$ in a product is 7. The number of ways to split up $13^4$ in a product is 5. Collectively this means $3^8 \cdot 5^6 \cdot 13^4$ can be split into a product in $9\cdot7\cdot5=315$ ways.
Since $2$ is not a factor, both factors in the product are odd. The value of $x$, that makes $(x+y)(x-y)$ be equal to the desired value, is the average of the the two factors in the product. Since the average of two positive odd integers is a positive integer, $x$ is always a positive integer.
Let $a = x+y$ and $b = x-y$. The 315 ways to split up the product can be divided into three groups: $a>b$, $a<b$ and $a=b$.


*

*The group $a=b$: There is one value in this group, and that's the one where $a=b=3^4\cdot5^3\cdot13^2$. In this case we have $y=0$, so it is not a solution.

*Every element in $a<b$ has a corresponding element in $a>b$: (the one where each power is swapped). Since only the ones in $a>b$ have $y>0$, only half of those not in $a=b$ are valid.


This means there are $(315-1)/2 = 157$ solutions.
A: The product $n=3^8\cdot 5^6\cdot13^4$ has a total of $(8+1)(6+1)(4+1)=315$ factors $d$. Those can be paired up as $(d,n/d)$. For the choice $d=n/d=\sqrt n$ the two factors are equal. For the remaining $157=(315-1)/2$ pairs we must use the bigger one as $x+y$ and the smaller as $x-y$. Because all the factors $d, n/d$ are odd, the resulting system has a solution $(x,y)$ in integers.
The answer is thus $157$. They come from solutions of the system $x+y=n/d, x-y=d$, that is,
$$
x=\frac{(n/d)+d}2,\quad y=\frac{(n/d)-d}2,
$$
with $d$ ranging over the set of factors $<\sqrt n$.
