For a given integer $n$, how many positive integer $(a,b)$ pairs exist which satisfy $2n^2=a^2+b^2$?
In particular, I'm looking for all $n$s where there are exactly 105 solutions. (One solution is $(n,n)$, and there are $2\cdot 52$ other solutions: $(a,b)$ and $(b,a)$ are two different solutions if $a\ne b$.)
I'm sure that there are theorems about the solutions of this kinds of equations. Where can I find them and read more?
Here is a very closely related question. The formula for the number of solutions is the product of $2m+1$ where $m$ runs through the multiplicities of division of the prime factors of $n$ that are${}\equiv1\pmod4$. So you could take $n=5^{52}$ as one solution to you problem, but you'll get smaller solutions using the factorization $105=3\times5\times7$, the smallest one being $n=5^3\times13^2\times17=359125$. A proof of the result (which uses Gaussian integers) can be found in this answer.