# Prove: Sum and Difference of two distinct positive integers are both perfect squares.

I'm trying to prove that there exists two distinct positive integers whose sum and difference are both perfect squares. I cannot find any pattern or characteristic between the pairs of numbers that work i.e.

• 4, 5
• 6, 10
• 8, 17
• 10, 6
• 10, 26

Any help will be greatly appreciated! Thanks!

Let those positive integers be $a$ and $b$.Then,

$a+b=x^2$

$a-b=y^2$

Adding the two we get $a=\frac{x^2+y^2}{2}$ and $b=\frac{x^2-y^2}{2}$

Since, a and b are integers we must have $x^2+y^2$ and $x^2-y^2$ must be even, for that we must have x and y both even or both odd.

Now for finding such pairs take any even $x,y$ for example let x=8 and y=4

which gives $a=40$ and $b=24$, we have $a+b=64=8^2$ and $a-b=16=4^2$

• Ramanujan would be proud (+1) – J. W. Perry Oct 30 '13 at 4:37
• @J.W.Perry Thank you,appreciated. – Shobhit Oct 30 '13 at 4:39
• This proof is great! Well done! :) – 1233dfv Oct 30 '13 at 4:53
• @RossBelgram Thank you, appreciated. – Shobhit Oct 30 '13 at 4:53