prove that there are no positive integers m and n such that both 4m^2+17n^2 and 17m^2+4n^2 are perfect squares

Borys Shumyatskiy | Certified Educator

0. Start from the contradiction, let 4m^2+17n^2 = a^2 and 17m^2+4n^2 = b^2.

1. If m and n have common divider, then both equations may be reduced:
m = k*m1, n = k*n1,
k^2*(4m1^2 + 17n1^2) = a^2 and k^2*(4n1^2 + 17m1^2) = b^2.
So k^2 | a^2 and k^2 | b^2, this implies k | a and k | b (proved by the fundamental theorem of algebra).

In such a way, we can assume that m and n are relatively prime.

2. Now consider both equations mod 3. Denote x mod 3 as [x]:

[4]*[m]^2 + [17]*[n]^2 = [a]^2, [4]*[n]^2 + [17]*[m]^2 = [b]^2
or [m]^2 - [n]^2 = [a]^2 and [n]^2 - [m]^2 = [b]^2.

Take into account that [x]^2 = 0 or 1, not 2 (=-1).

Then consider all variants:
1) [m]=[n]=0. Impossible by the p.1.
2) [m]=0 and [n]=1 (or [n]=0 and [m]=1). Then [a]^2 = -1 (or [b]^2=-1) which is impossible.

3) [m]=1 and [n]=1. Then [a]=[b]=0, i.e. 3|a and 3|b.
So [m]^2+[n]^2 = 2 and 9|(a^2+b^2).