Any product of two evens or two odds (sticking just to positives for the purpose of this problem) can be expressed as a difference of two perfect squares. 11*17=187=196-9 is an example.
A: Prove this idea.
B: Come up with a formula that gives the two perfect squares. Call the larger one a and the smaller one b.
SOLUTION TO PART A:
If both the numbers are odd,let these possess the respective forms a= 2m+1 and b= 2n+1. Then, we have:
= 4mn + 2m + 2n + 1
= (m^2 + m^2 + 1 + 2mn+ 2m+2n) - (m^2+n^2 - 2mn)
= (m+n+1)^2 - (m-n)^2
= ((a+b)/2)^2 - ((a+b)/2)^2
We also have:
4mn + 2m + 2n +1
= (2mn + m+n+1)^2 - (2mn+m+n)^2
= ((ab+1)/2)^2 - ((ab-1)/2)^2
When both numbers are even, we have:
a = 2m (say) and b = 2n(say), so that
ab = 4mn
= (m+n)^2 - (m-n)^2
= (((a+b)/2)^2 - ((a+b)/2)^2
Thus, when both a and b are odd, or both a and b are even, the product ab is always expressible as the difference of squares of integers.