Phil

> Shurely Shome mishtake

Yep, I was misattributing a misattribution, sorry.

Here I try to set the history straight.

Theorem [Fermat] : Every prime p which is congruent

to 1 modulo 4 can be expressed as a sum of two squares.

Jon credited this to Hardy.

Fermat proved it by a "method of descent", roughly like this:

1) We know that x^2=1 mod p has a solution.

Chose x such that 2|x|<p. Then x^2+1 is a positive

multiple of p and is less than p^2.

2) We have found a pair (x1,y1)=(x,1) with

x1^2+y1^2=m*p and m in [1,p-1].

I claim that if m>1 we can make another pair,

say (x2,y2), with

x2^2+y2^2=n*p and n in [1,m-1]

as follows:

x2=(u*x1+v*y1)/m

y2=(v*x1-u*y1)/m

with

u=x1 mod m and 2*|u|<m

v=y1 mod m and 2*|v|<m

giving

u^2+v^2=x1^2+y1^2 mod m=0 mod m

and hence

u^2+v^2=n*m for some n in [1,m-1]

and hence

x2^2+y2^2=(u^2+v^2)*(x1^2+y1^2)/m^2=(n*m)*(m*p)/m^2=n*p

as claimed.

3) Keep on trucking until you get to

x^2+y^2=p

[End sketch of Fermat's proof]

When I saw this, in a little book by

T.H. Jackson, more than a quarter of a century

ago, it took my breath away;

Fermat descent is a truly wonderful thing.

David