4k+1primeuniquesumoftwosquares

4K+1 Prime Unique Sum of Two Squares

Proof:

Consider: p=x**2 + y**2

Suppose p|x, then p|y => p**2|p, clearly false, so WLOG hcf (p,x)=1

Therefore x**2 + kp = -(y**2) has solution x0, y0 s.t.

x0**2 + y0**2 = kp

WLOG, take 0 < |x0| < p**(1/2), 0 < |y0| < p**(1/2)

=> x0**2 + y0**2 < 2p

i.e. x0**2 + y0**2 = p

Proof:

Suppose p=a**2 + b**2=c**2 + d**2

a**2d**2 - b**2c**2=p(d**2 - b**2)==0 [mod p]

ad==+/-bc [mod p]

Since a,b,c,d all <p**(1/2),

ad-bc=0 or ad+bc=p

Consider second equality:

p**2=(a**2 + b**2)(c**2 + d**2)=(ad + bc)**2 + (ac - bd)**2

=p**2 + (ac-bd)**2

=> ac-bd=0

So, either ad=bc or ac=bd

Suppose, for instance, that ad=bc. Then a|bc, with hcf (a,b)=1, which forces a|c, i.e. c=ka

Therefore ad=bc=b(ka), i.e. d=bk

Now, p=c**2 + d**2=k**2(a**2 + b**2) => k=1 => a=c, b=d

Similarly, if ac=bd, a=d, b=c