# Number of integer solutions of $2n^2=a^2+b^2$

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?

-