PDA

View Full Version : How many ways to express a prime (= 1 mod 4) into sum of 2 squares ?


lifom
Jun6-11, 07:28 AM
I know that any prime p = 1 mod 4 can be expressed as sum of 2 squares.
But how many different pairs of integers a,b such that p = a^2+b^2? (with a>b!)
It seems there is only one pair. How to prove it?
I try in this way: assume p = a^2+b^2 = c^2+d^2 (with a>c>d>b) and try to show it has contradiction, but I fail.

ramsey2879
Jun7-11, 06:38 AM
I know that any prime p = 1 mod 4 can be expressed as sum of 2 squares.
But how many different pairs of integers a,b such that p = a^2+b^2? (with a>b!)
It seems there is only one pair. How to prove it?
I try in this way: assume p = a^2+b^2 = c^2+d^2 (with a>c>d>b) and try to show it has contradiction, but I fail.
It is an old and well known proof. I would try and google for it. I believe it may have to do with imaginary integers and factoring the "difference of two squares". I am 65 and its been a long time since I read the proof so I don't remember.

Petek
Jun7-11, 07:27 PM
The following is what ramsey2879 might have had in mind:

The ring R = {a + bi : a and b are integers} (where i = \sqrt{-1}) can be shown to be a unique factorization domain (http://en.wikipedia.org/wiki/Unique_factorization_domain). It also can be shown that if p is a prime integer congruent to 1 mod 4 and p = a^2 + b^2 for integers a and b, then a + bi and a - bi are primes in R. If there were integers c and d such that p = c^2 + d^2, then we would have (a + bi)(a - bi) = (c + di)(c - di). By unique factorization in R, the factors c + di and c - di must be the same as a + bi and a - bi, up to multiplication by units. Since the units in R are 1, -1, i and -i, it follows that the integers a and b are the same as the integers c and d. The ring R is usually called the Gaussian integers (http://en.wikipedia.org/wiki/Gaussian_integer).

lifom
Jun7-11, 09:40 PM
The following is what ramsey2879 might have had in mind:

The ring R = {a + bi : a and b are integers} (where i = \sqrt{-1}) can be shown to be a unique factorization domain (http://en.wikipedia.org/wiki/Unique_factorization_domain). It also can be shown that if p is a prime integer congruent to 1 mod 4 and p = a^2 + b^2 for integers a and b, then a + bi and a - bi are primes in R. If there were integers c and d such that p = c^2 + d^2, then we would have (a + bi)(a - bi) = (c + di)(c - di). By unique factorization in R, the factors c + di and c - di must be the same as a + bi and a - bi, up to multiplication by units. Since the units in R are 1, -1, i and -i, it follows that the integers a and b are the same as the integers c and d. The ring R is usually called the Gaussian integers (http://en.wikipedia.org/wiki/Gaussian_integer).

Thanks, But I haven't learnt ring yet. So would you mind to suggest a eaiser proof?

Petek
Jun8-11, 04:50 PM
Hmm ... . That's the only proof I know right off the top of my head. Is this an exercise from a book? If so, which section is it in? Is there a hint? Are there any theorems in the section that might be relevant? Do you know this formula:

(x^2 + y^2)(u^2 + v^2) = (xu\ \pm \ yv)^2 + (xv \ \mp \ yu)^2

lifom
Jun8-11, 11:05 PM
Hmm ... . That's the only proof I know right off the top of my head. Is this an exercise from a book? If so, which section is it in? Is there a hint? Are there any theorems in the section that might be relevant? Do you know this formula:

(x^2 + y^2)(u^2 + v^2) = (xu\ \pm \ yv)^2 + (xv \ \mp \ yu)^2

Many thanks. I have found another proof on the web.
May I ask the generalization: Let S(m) be the number of ways to express m = a^2+b^2, a>=b.
S(p) = 1 if p = prime = 1 mod 4 (proved)
S(p) = 0 if p = prime = 3 mod 4 (proved)
S(pq) = 2 if p,q are distinct prime = 1mod 4 (proved)
S(p_1p_2...p_r) = 2^(r-1) if all distinct prime = 1 mod 4 (how to prove?)
I have use Mathematical Induction, but can't handle the induction steps...
Let p_1p_2...p_r = (a_i)^2+(b_i)^2 for i = 1,2,...,2^(r-1)
and let p_(r+1) = A^2+B^2.
Then p_1p_2...p_rp_(r+1)=((a_i)^2+(b_i)^2)(A^2+B^2)=...
I can show that ((a_i)^2+(b_i)^2)(A^2+B^2) can form 2 different sums of squares, but I can't show why ((a_i)^2+(b_i)^2)(A^2+B^2) are all different for each i...
Any suggestions?

ThomasEgense
Jun14-11, 03:53 AM
I know that any prime p = 1 mod 4 can be expressed as sum of 2 squares.
But how many different pairs of integers a,b such that p = a^2+b^2? (with a>b!)
It seems there is only one pair. How to prove it?
I try in this way: assume p = a^2+b^2 = c^2+d^2 (with a>c>d>b) and try to show it has contradiction, but I fail.

This page also shows how to calculate the two squares. (only using GCD algoritm over complex numbers).

http://wims.unice.fr/wims/wims.cgi?session=G541DFD6A1.2&+lang=en&+module=tool%2Fnumber%2Ftwosquares.en&+cmd=help&+special_parm=

robert Ihnot
Jun14-11, 08:23 AM
This is a famous problem and not an easy one. Euler first proved it. I quote from Wikipedia: "Fermat's theorem on sums of two squares asserts that an odd prime number p can be expressed as
p = x2 + y2
with integer x and y if and only if p is congruent to 1 (mod 4). The statement was announced by Fermat in 1640, but he supplied no proof.
The "only if" clause is easy: a perfect square is congruent to 0 or 1 modulo 4, hence a sum of two squares is congruent to 0, 1, or 2. An odd prime number is congruent to either 1 or 3 modulo 4, and the second possibility has just been ruled out. The first proof that such a representation exists was given by Leonhard Euler in 1747 and was quite complicated. Since then, many different proofs have been found. Among them, the proof using Minkowski's theorem about convex sets[1] and Don Zagier's stunningly short proof based on involutions especially stand out."