# How many different right triangles are possible with the shorter side of odd length?

I was trying to solve this problem but unable to figure it out completely. I thing number of was odd integer $n$ can be the side of right triangle is number of factor of $\frac{n^2}{2}$. Can some one help me? Here is the problem link. Thanks.

If $a$ is odd and $a^2+b^2=c^2$ then $a^2=c^2-b^2=(c+b)(c-b)$. So $c-b$ must be among the smaller factors of $a^2$. The number of solutions is thus $\frac12$ times the number of divisors of $a^2$.