Difference of squares - number of representations

265 Views Asked by At

There exists a well-known result concerning a number of representations of $n$ as a sum of two squares. Is there anything similar for a number of representations of $n$ as a difference of two squares? Thank you.

1

There are 1 best solutions below

0
On BEST ANSWER

Th difference of two squares is quite easy. Say we have $l = m^2 - n^2$. Then $$ l = m^2 - n^2 = (m-n)(m+n) $$ so there is one way for each decomposition of $l$ into two factors of the same parity.


Edit: A small note on how to find $m$ and $n$: Say $l = ab$, with $a, b$ either both odd or both even. Then $m = \frac{a + b}{2}$ and $n = \pm\frac{a - b}{2}$ (you're free to choose sign, it'll cancel out once you put it into $(m+n)(m-n)$). These fractions need to be integers, and that is why $a$ and $b$ need to have the same parity.