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

  • Context: Graduate 
  • Thread starter Thread starter lifom
  • Start date Start date
  • Tags Tags
    Prime Squares Sum
Click For Summary

Discussion Overview

The discussion revolves around the expression of prime numbers congruent to 1 modulo 4 as sums of two squares. Participants explore the number of distinct pairs of integers (a, b) such that a^2 + b^2 equals the prime, with a being greater than b. The conversation includes attempts to prove the uniqueness of such pairs and references to various mathematical proofs and concepts.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • Some participants assert that any prime p = 1 mod 4 can be expressed as a sum of two squares, questioning how many distinct pairs (a, b) exist.
  • One participant proposes that there seems to be only one pair (a, b) for each prime and attempts to prove this by contradiction but encounters difficulties.
  • Another participant references the unique factorization in the ring of Gaussian integers and suggests that if p can be expressed in two different ways as a sum of squares, it leads to a contradiction.
  • Some participants express a desire for simpler proofs, indicating that they are not familiar with advanced concepts like rings.
  • A participant introduces a generalization regarding the number of ways to express a number as a sum of two squares, presenting specific cases for primes and products of primes, and seeks help with the induction step for the general case.
  • One participant mentions a historical context, noting that Euler first proved the theorem regarding sums of two squares and cites Fermat's theorem on the subject.

Areas of Agreement / Disagreement

Participants generally agree on the foundational theorem that primes congruent to 1 mod 4 can be expressed as sums of two squares. However, there is no consensus on the uniqueness of the pairs (a, b) or the methods of proof, with multiple approaches and levels of understanding presented.

Contextual Notes

Some participants express limitations in their mathematical background, particularly regarding advanced topics like unique factorization domains and Gaussian integers, which may affect their ability to engage with certain proofs.

Who May Find This Useful

This discussion may be useful for those interested in number theory, particularly in the properties of prime numbers and their representations as sums of squares, as well as for learners seeking various approaches to mathematical proofs.

lifom
Messages
14
Reaction score
0
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.
 
Physics news on Phys.org
lifom said:
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.
 
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. 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.
 
Petek said:
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. 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.

Thanks, But I haven't learned ring yet. So would you mind to suggest a eaiser proof?
 
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
 
Petek said:
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?
 
lifom said:
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 algorithm over complex numbers).

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

Attachments

  • squares.GIF
    squares.GIF
    47.8 KB · Views: 588
Last edited by a moderator:
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."
 

Similar threads

  • · Replies 17 ·
Replies
17
Views
2K
Replies
48
Views
5K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 21 ·
Replies
21
Views
2K
Replies
17
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 12 ·
Replies
12
Views
901
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
Replies
4
Views
3K