Possible Duplicate:
$a^2-b^2 = x$ where $a,b,x$ are natural numbers
I'm trying to find all the $(m,n)$ pairs that satisfy $m^2-n^2=r$, where $r$ is a given positive odd integer, $m>n>0$, $\gcd (m,n) =1$, and $m$ and $n$ are of opposite parity.
For example: Given $m^2-n^2=21$, I'm supposed to figure out that the only solutions are (5,2) and (11,10).
My course materials state that that the method is to systematically try $n=1,2,3,...,10$ (i.e. $1\leq n<\frac r2=\frac{21}2$). But why can't $n$ exceed $\frac r2$?
On a related note, for $m^2+n^2=r$ satisfying the same conditions as above, I can see that $1\leq n<\sqrt \frac r2$. (Please correct me if I'm wrong about this.)
Thank you.