Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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.

share|improve this question

marked as duplicate by ShreevatsaR, Phira, Thomas, Henry T. Horton, Arkamis Nov 1 '12 at 16:08

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers 2

up vote 3 down vote accepted

If $(m+n)(m-n)=d$ and we take $m>n>0$, we can see that the largest difference between the two factors occurs when $m+n=d$, and $m-n=1$.

Taking the difference we get $2n=d-1$ so that the greatest possible value of $n$ is $\frac {d-1}2$.

share|improve this answer
    
Thank you, Mark. –  Ryan Nov 1 '12 at 15:06

The differences between squares increase as the squares themselves increase. If $n,\ m > 10$ then the smallest difference possible is $$12^2 - 11^2 = (12 - 11)(12 + 11) = 23$$ which is already larger than your answer.

By the way, these are not Pythagorean triples.

share|improve this answer
    
Thank you, EuYu. –  Ryan Nov 1 '12 at 15:20

Not the answer you're looking for? Browse other questions tagged or ask your own question.