Alphabeta Math
How statement and proof provenance work

The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.

  • Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
  • AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
  • AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.

These labels describe origin, not correctness: citations and verification chips remain separate evidence.

✓ 17 results · all verified · 15 also independently AI-judged
Every result on this page is machine-checked by a proof checker and read in full and owner-audited; the judge is an additional, independent cross-model AI review of the proofs. The 2 not AI-judged were verified by owner audit (typically over a confirmed judge false positive), not failures.

Sums of Two Squares

1 · Prerequisites

2 · Summary

The first supplement to quadratic reciprocity determines exactly when −1 is a square modulo an odd prime. Canonical prime factorisation and p-adic valuations record the multiplicity of every prime divisor, while finite counting and the strong pigeonhole principle produce small congruent representatives. The existence and order properties of real square roots turn their integer bounds into strict inequalities.

A two-square representation is defined together with its primitive form, and the Brahmagupta–Fibonacci identity controls products. Thue's lemma yields Fermat's theorem for primes, while a factorisation lemma gives uniqueness up to signs and order. Prime-power analysis and the local obstruction at primes congruent to three modulo four lead to the full characterisation. Separate primitive-product and primitive-prime-power lemmas then give the primitive criterion and its product, divisor, and squarefree consequences.

3 · Logical flowchart

4 · Definitions, theorems and proofs

DefinitionDefinition: Literature-sourcedProof: Not applicablejudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

Representations and primitive representations as sums of two squares

Definition

A representation of a nonnegative integer n as a sum of two squares is an ordered pair (x,y)∈Z2 such that n=x2+y2.

It is primitive when gcd⁡(x,y)=1 (Common divisor, and the greatest common divisor gcd⁡(a,b), with the convention gcd⁡(0,0):=0). Two representations are equivalent up to signs and order when one is obtained from the other by independently changing coordinate signs and possibly interchanging the coordinates, and essentially different when they are not so equivalent.

For a positive odd integer, a representation (x,y) is normalized when x and y are positive, x is odd, and y is even.

Remarks

The ordered-pair convention retains signs and order when a correspondence is being counted. Equivalence up to signs and order is invoked only when those symmetries are deliberately discarded.

LemmaStatement: Literature-sourcedProof: Literature-sourcedprecheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

The Brahmagupta–Fibonacci two-square identity

Statement

For all integers a,b,c,d,

(a2+b2)(c2+d2)=(ac−bd)2+(ad+bc)2=(ac+bd)2+(ad−bc)2.

Facts & Assumptions

Given: Integers a,b,c,d.

Proof

technique · direct
1.1givenalgebra

Expanding gives (ac−bd)2+(ad+bc)2=a2c2−2abcd+b2d2+a2d2+2abcd+b2c2=(a2+b2)(c2+d2).

2.1givenalgebra∎

Likewise (ac+bd)2+(ad−bc)2=a2c2+2abcd+b2d2+a2d2−2abcd+b2c2=(a2+b2)(c2+d2).

CorollaryStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

Sums of two squares are closed under products

Statement

The product of two nonnegative integers representable as sums of two squares is again representable as a sum of two squares (Representations and primitive representations as sums of two squares).

Facts & Assumptions

Given: Nonnegative integers m,n, each representable as a sum of two squares.

[F1]

A representation of a nonnegative integer n as a sum of two squares is an ordered pair (x,y)∈Z2 such that n=x2+y2 (Representations and primitive representations as sums of two squares).

[L1]

For all integers a,b,c,d, (a2+b2)(c2+d2)=(ac−bd)2+(ad+bc)2=(ac+bd)2+(ad−bc)2 (The Brahmagupta–Fibonacci two-square identity).

Proof

technique · direct
1.1givenF1choose

Choose integers a,b,c,d with m=a2+b2 and n=c2+d2.

2.1step 1.1L1algebra

Then mn=(ac−bd)2+(ad+bc)2 by the two-square identity.

3.1step 2.1F1∎

The displayed integer pair represents mn by [F1]. This also covers a zero factor, for which the pair (0,0) represents zero and the same formula gives the zero product.

PropositionStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

Representations of an odd integer correspond to representations of twice that integer

Statement

Let m be a positive odd integer. The map

Φ(x,y)=(x+y,x−y)

is a bijection from the ordered signed two-square representations of m to those of 2m, with inverse

Ψ(u,v)=(u+v2,u−v2).

The same maps restrict to a bijection between the primitive representations (Representations and primitive representations as sums of two squares).

Facts & Assumptions

Given: A positive odd integer m.

[F1]

A representation of a nonnegative integer n as a sum of two squares is an ordered pair (x,y)∈Z2 such that n=x2+y2 (Representations and primitive representations as sums of two squares).

[F2]

An integer d is a common divisor of a and b when d∣a and d∣b (Common divisor, and the greatest common divisor gcd⁡(a,b), with the convention gcd⁡(0,0):=0).

[L2]

If a prime p divides a product ab, then p∣a or p∣b (Euclid's lemma: if p is prime and p∣ab then p∣a or p∣b).

Proof

technique · direct
1.1givenF1algebraconstruct

If x2+y2=m, oddness of m makes x,y have opposite parity, so x+y and x−y are odd; moreover (x+y)2+(x−y)2=2m, so Φ sends representations of m to representations of 2m.

1.2givenF1algebra

If u2+v2=2m, reduction modulo 4 shows that u and v are both odd: their squares cannot both be even because 2m≡2(mod4), and they cannot have opposite parity because their square sum would be odd. Thus Ψ(u,v) has integer coordinates, and their squared sum is (u2+v2)/2=m.

2.1step 1.1step 1.2algebra

Direct substitution gives Ψ(Φ(x,y))=(x,y) and Φ(Ψ(u,v))=(u,v).

2.2step 1.1F2L1L2algebra

Suppose (x,y) is primitive and a common divisor greater than 1 divides both coordinates of Φ(x,y). By [L1] it has a prime divisor ℓ. Since x+y and x−y are odd, ℓ is odd; because ℓ divides 2x and 2y, [L2] gives ℓ∣x and ℓ∣y, contradicting primitivity. Hence Φ(x,y) is primitive.

2.3step 1.2F2L1algebra

Suppose (u,v) is primitive and a common divisor greater than 1 divides both coordinates of Ψ(u,v). A prime divisor ℓ supplied by [L1] then divides their sum u and difference v, contradicting primitivity. Hence Ψ(u,v) is primitive.

3.1step 2.1step 2.2step 2.3F1∎

The mutually inverse maps of step 2.1 give the first bijection, and steps 2.2 and 2.3 show that they restrict to mutually inverse maps on primitive representations.

LemmaStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

A prime congruent to 3 modulo 4 divides both coordinates of a divisible two-square sum

Statement

If q≡3(mod4) is prime and q∣x2+y2, then q∣x and q∣y. Consequently q2∣x2+y2.

Facts & Assumptions

Given: A prime q≡3(mod4) and integers x,y such that q∣x2+y2.

[F1]

A representation of a nonnegative integer n as a sum of two squares is an ordered pair (x,y)∈Z2 such that n=x2+y2 (Representations and primitive representations as sums of two squares).

[L1]

For an odd prime p, (−1/p)=1 if and only if p≡1(mod4), while (−1/p)=−1 if and only if p≡3(mod4) (First supplement: (−1/p)=(−1)(p−1)/2).

[F2]

For an odd prime p, the Legendre symbol is 0 when p divides the numerator, 1 when its nonzero class is a square, and −1 otherwise (The Legendre symbol, including its zero value).

[L2]

For every prime p, addition and multiplication make Z/p a field (For every prime p, the two operations on Z/p make it a field).

[L3]

If a prime p divides ab, then p∣a or p∣b (Euclid's lemma: if p is prime and p∣ab then p∣a or p∣b).

[F3]

The congruence a≡b(modn) means that n∣(a−b) (Congruence modulo an integer: a≡b(modn) when n∣(a−b), including the moduli 0 and 1).

Proof

technique · direct
1.1givenF1F3

The divisibility hypothesis is the congruence x2+y2≡0(modq).

2.1step 1.1L3algebra

If q∣y, then step 1.1 gives q∣x2, so [L3] gives q∣x; the same argument with the coordinates interchanged handles q∣x.

2.2step 1.1L2F2F3algebra

If neither coordinate were divisible by q, the nonzero class of y would be invertible in the field Z/q, and step 1.1 would give (xy−1)2=−1. Thus −1 would be a nonzero quadratic residue and (−1/q)=1.

3.1step 2.2L1F2given

Since q≡3(mod4), [L1] instead gives (−1/q)=−1, contradicting step 2.2.

4.1step 2.1step 3.1algebra∎

Hence at least one coordinate is divisible by q, and step 2.1 makes both divisible by q. Writing x=qx0 and y=qy0 gives x2+y2=q2(x02+y02).

PropositionStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

Every nonzero residue modulo an odd prime is a sum of two squares

Statement

Let p be an odd prime and let a∈Z with p∤a. Then there are integers x,y such that

x2+y2≡a(modp).

Facts & Assumptions

Given: An odd prime p and a nonzero class [a]∈Z/p.

[L1]

For an odd prime p, exactly (p−1)/2 nonzero classes are quadratic residues modulo p (An odd prime has (p−1)/2 nonzero quadratic residues and as many nonresidues).

[L4]

A subset of a finite set is finite and has cardinality at most that of the ambient set (A subset of a finite set is finite, with ∣B∣≤∣A∣, and equality holds if and only if B=A).

[L5]

For every n∈N, (Z/n,+,[0]n) is an abelian group, and multiplication distributes over addition on both sides (For every natural n, (Z/n,+) is an abelian group, multiplication is a commutative monoid operation, and both distributive laws hold).

Proof

technique · contradiction
1.1givenL1algebra

Let Q be the set of all square classes in Z/p, including zero. By [L1], ∣Q∣=(p+1)/2.

2.1step 1.1L5algebraconstruct

Translation and negation are bijections of the additive group, so a−Q:={a−z:z∈Q} also has (p+1)/2 elements.

3.1step 1.1step 2.1L3assume-contraalgebra

Suppose, for contradiction, that Q and a−Q are disjoint. Then [L3] gives ∣Q∪(a−Q)∣=(p+1)/2+(p+1)/2=p+1.

4.1step 3.1L2L4algebra

But Q∪(a−Q)⊆Z/p, so [L2] and [L4] give ∣Q∪(a−Q)∣≤p, contradicting step 3.1.

5.1step 4.1L5choosealgebradischarge-contradiction∎

Choose z∈Q∩(a−Q). Write z=[x2] and z=[a−y2] for integers x,y. Then [x2+y2]=[a] by [L5], which is the required congruence.

LemmaStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

Thue's lemma on small nonzero representatives

Statement

Let p be a prime and let a∈Z with p∤a. Then there are nonzero integers r,s with ∣r∣,∣s∣<p and ra≡s(modp).

Facts & Assumptions

Given: A prime p and an integer a with p∤a.

[L1]

Every nonempty finite subset of R has a maximum and a minimum (Every nonempty finite set of reals has a maximum and a minimum).

[L2]

Every nonnegative real t has a unique nonnegative square root t whose square is t (Square roots exist: a unique a≥0 with (a)2=a; the positives are {x2:x≠0}).

[L5]

If a map from a finite set A to a finite set B has ∣A∣>∣B∣, then some fibre contains more than one element (If ∣A∣>k∣B∣ then every f:A→B has a fibre with more than k elements, and for nonempty B some fibre has at least ⌈∣A∣/∣B∣⌉ elements).

[L6]

If a prime p divides uv, then p∣u or p∣v (Euclid's lemma: if p is prime and p∣ab then p∣a or p∣b).

[F1]

The congruence u≡v(modn) means that n∣(u−v) (Congruence modulo an integer: a≡b(modn) when n∣(a−b), including the moduli 0 and 1).

Proof

technique · direct
1.1givenL1construct

The set H:={k∈N:k≤p and k2<p} is finite and contains 0, so [L1] gives its largest element h.

2.1step 1.1L2givenalgebra

One has (h+1)2>p: a strict inequality in the other direction would put h+1 in H, while equality would factor the prime p as (h+1)(h+1) with 1<h+1<p. Also h2<p=(p)2, so h<p by nonnegativity and [L2].

3.1step 2.1L3L4algebra

Put I:={0,1,…,h}. Then [L3] gives ∣I×I∣=(h+1)2>p=∣Z/p∣ by step 2.1 and [L4].

4.1step 3.1L5F1construct

Apply [L5] to (i,j)↦[ia−j]p. Distinct pairs (i,j),(i′,j′)∈I×I have the same image. With r=i−i′ and s=j−j′, this says ra≡s(modp).

5.1step 4.1step 2.1F1L2algebra

The coordinate bounds give ∣r∣,∣s∣≤h<p.

6.1step 5.1L6F1givenalgebra

If r=0, then [F1] gives p∣s; the bound ∣s∣<p<p forces s=0, contrary to distinctness. If s=0, then p∣ra; [L6] and p∤a give p∣r, and the same bound forces r=0, again a contradiction.

7.1step 4.1step 5.1step 6.1∎

Thus the integers r,s from step 4.1 are both nonzero, satisfy ra≡s(modp), and obey the required strict bounds.

TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

Fermat's two-square theorem for primes

Statement

A prime p is a sum of two integer squares if and only if p=2 or p≡1(mod4) (Representations and primitive representations as sums of two squares).

Facts & Assumptions

Given: A prime p.

[F1]

A representation of a nonnegative integer n as a sum of two squares is an ordered pair (x,y)∈Z2 such that n=x2+y2 (Representations and primitive representations as sums of two squares).

[L1]

If p is prime, p∤a, then there are nonzero integers r,s with ∣r∣,∣s∣<p and ra≡s(modp) (Thue's lemma on small nonzero representatives).

[L2]

For an odd prime p, (−1/p)=1 if and only if p≡1(mod4) (First supplement: (−1/p)=(−1)(p−1)/2).

[F2]

For an odd prime p, (a/p)=1 means that p∤a and a is a quadratic residue modulo p (The Legendre symbol, including its zero value).

[F3]

The congruence a≡b(modn) means that n∣(a−b) (Congruence modulo an integer: a≡b(modn) when n∣(a−b), including the moduli 0 and 1).

Proof

technique · direct
1.1givenF1algebra

If an odd prime satisfies p=x2+y2, the square residues modulo 4 show that x,y have opposite parity and hence p≡1(mod4).

1.2F1algebra

The remaining even prime has the representation 2=12+12.

1.3givenL2F2F3choose

For the converse direction, suppose p≡1(mod4). Then p is odd, and [L2] and [F2] provide an integer a with a2≡−1(modp) and p∤a.

2.1step 1.3L1F3

Apply [L1] to this a to obtain nonzero integers r,s with ∣r∣,∣s∣<p and ra≡s(modp).

3.1step 1.3step 2.1F1F3algebra

Squaring the congruence in step 2.1 and using a2≡−1 gives p∣r2+s2. Moreover 0<r2+s2<p+p=2p. The only positive multiple of p below 2p is p, so p=r2+s2.

4.1step 1.1step 1.2step 3.1∎

Step 1.1 proves necessity for odd primes, step 1.2 handles p=2, and step 3.1 proves sufficiency when p≡1(mod4).

LemmaStatement: AI-adaptedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

Two essentially different two-square representations factor an odd integer

Statement

Let N be odd and suppose

N=x2+y2=u2+v2,

where x,u are positive odd integers, y,v are positive even integers, and 0<x<u. Then 0<v<y, and two essentially different normalized representations force a factorisation N=PQ with P,Q>1. More precisely, there are positive integers e,f,g,h such that

x=eg−fh,y=fg+eh,u=eg+fh,v=fg−eh,

and N=(e2+f2)(g2+h2).

Facts & Assumptions

Given: The two normalized representations and inequalities in the Statement.

[L1]

For all integers a,b,c,d, (a2+b2)(c2+d2)=(ac−bd)2+(ad+bc)2=(ac+bd)2+(ad−bc)2 (The Brahmagupta–Fibonacci two-square identity).

[F1]

An integer d is a common divisor of a and b when d∣a and d∣b (Common divisor, and the greatest common divisor gcd⁡(a,b), with the convention gcd⁡(0,0):=0).

Proof

technique · direct
1.1givenalgebra

Since u2−x2=y2−v2>0, one has 0<v<y, and (u−x)(u+x)=(y−v)(y+v). All four factors are positive and even, so with A=(u+x)/2, B=(u−x)/2, C=(y+v)/2, and D=(y−v)/2 one has AB=CD.

2.1step 1.1F1choose

Let g=gcd⁡(A,C) and write A=eg, C=fg. Positivity gives e,f,g>0, and gcd⁡(e,f)=1, since a common divisor greater than one would make a common divisor of A,C larger than g.

3.1step 1.1step 2.1L2algebra

The equality AB=CD becomes eB=fD. Since gcd⁡(e,f)=1, [L2] gives e∣D and f∣B; write D=eh and B=fh with h>0.

4.1step 2.1step 3.1algebra

From A=eg, B=fh, C=fg, and D=eh one obtains u=A+B=eg+fh, x=A−B=eg−fh, y=C+D=fg+eh, and v=C−D=fg−eh.

5.1step 4.1L1algebra∎

By [L1], (e2+f2)(g2+h2)=(eg+fh)2+(fg−eh)2=u2+v2=N. Each factor exceeds one because all four entries are positive.

TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

A prime congruent to 1 modulo 4 has one two-square representation up to signs and order

Statement

Let p≡1(mod4) be prime. There are unique positive integers x,y with x odd, y even, and

p=x2+y2.

Every ordered signed representation of p is obtained from this pair by changing signs and interchanging coordinates (Representations and primitive representations as sums of two squares).

Facts & Assumptions

Given: A prime p≡1(mod4).

[F1]

A representation of a nonnegative integer n as a sum of two squares is an ordered pair (x,y)∈Z2 such that n=x2+y2 (Representations and primitive representations as sums of two squares).

[L1]

A prime p is a sum of two integer squares if and only if p=2 or p≡1(mod4) (Fermat's two-square theorem for primes).

[L2]

For an odd integer, two essentially different normalized representations force a factorisation N=PQ with P,Q>1 (Two essentially different two-square representations factor an odd integer).

Proof

technique · direct
1.1givenL1F1choose

By [L1], choose integers a,b with p=a2+b2.

1.2givenF1algebra

Neither coordinate is zero, since a prime cannot be a square of an integer greater than one. Since p is odd, exactly one coordinate is odd: two odd squares sum to 2 modulo 4, and two even squares give an even sum. Changing signs and interchanging coordinates therefore turns every representation into a positive normalized one.

2.1step 1.2L2given

If two normalized representations differed, their positive odd coordinates would differ; order them as 0<x<u and apply [L2]. This would write the prime p as a product of two integers greater than one, a contradiction. Hence the normalized representation is unique.

3.1step 1.1step 1.2step 2.1F1algebra∎

Step 1.1 supplies the normalized pair, step 2.1 makes it unique, and undoing the sign changes and interchange in step 1.2 gives all ordered signed representations and no others.

LemmaStatement: AI-adaptedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

Prime powers represented as sums of two squares

Statement

Every power of 2 and every power of a prime p≡1(mod4) is a sum of two squares; a power of a prime q≡3(mod4) is representable exactly when its exponent is even. The exponent ranges over all of N, including zero.

Facts & Assumptions

Given: A prime and a natural exponent.

[F1]

A representation of a nonnegative integer n as a sum of two squares is an ordered pair (x,y)∈Z2 such that n=x2+y2 (Representations and primitive representations as sums of two squares).

[L1]

The product of two nonnegative integers representable as sums of two squares is again representable as a sum of two squares (Sums of two squares are closed under products).

[L2]

If q≡3(mod4) is prime and q∣x2+y2, then q∣x and q∣y (A prime congruent to 3 modulo 4 divides both coordinates of a divisible two-square sum).

[L3]

A prime p is a sum of two integer squares if and only if p=2 or p≡1(mod4) (Fermat's two-square theorem for primes).

[L4]

If a property holds at 0 and passes from n to n+1, it holds for every n∈N (The principle of mathematical induction).

Proof

technique · direct
1.1F1basealgebra

For every prime ℓ, the exponent-zero power is ℓ0=1=12+02.

1.2F1constructalgebra

If q≡3(mod4), every even power has the explicit representation q2j=(qj)2+02.

1.3F1L2L4algebradischarge-induction

If q2j+1=x2+y2, then [L2] gives x=qx1 and y=qy1, so q2j−1=x12+y12 when j≥1; at j=0, the same divisibility would make q2 divide q, which is impossible. Induction on j repeatedly reduces any alleged odd-exponent representation to that impossible base case.

2.1step 1.1L1L3L4discharge-induction

The prime 2 and every prime p≡1(mod4) are represented by [L3]. Multiplying an induction-stage representation by the prime representation and using [L1] gives one for the next power, so [L4] represents all their natural powers.

3.1step 1.1step 2.1step 1.2step 1.3∎

Steps 1.1 and 2.1 handle 2 and primes congruent to one modulo four, while steps 1.2 and 1.3 prove both directions for primes congruent to three modulo four.

TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passaudited 2026-08-24Open item page →

Characterisation of positive integers that are sums of two squares

Statement

A positive integer n is a sum of two squares if and only if every prime q≡3(mod4) occurs to an even exponent in its canonical prime factorisation.

Facts & Assumptions

Given: A positive integer n.

[F1]

A representation of a nonnegative integer n as a sum of two squares is an ordered pair (x,y)∈Z2 such that n=x2+y2 (Representations and primitive representations as sums of two squares).

[L1]

The product of two nonnegative integers representable as sums of two squares is again representable as a sum of two squares (Sums of two squares are closed under products).

[L2]

If q≡3(mod4) is prime and q∣x2+y2, then q∣x and q∣y (A prime congruent to 3 modulo 4 divides both coordinates of a divisible two-square sum).

[L3]

Every power of 2 and every power of a prime p≡1(mod4) is a sum of two squares; a power of q≡3(mod4) is representable exactly when its exponent is even (Prime powers represented as sums of two squares).

[L7]

If a property holds at 0 and passes from j to j+1, it holds for every j∈N (The principle of mathematical induction).

Proof

technique · direct
1.1givenF1L4algebra

For the reverse direction at n=1, the canonical factorisation is empty and (1,0) represents 1.

1.2givenL3L4

For the reverse direction at n>1, assume every three-mod-four prime has even valuation. By [L3], every prime-power factor in [L4] is representable.

1.3givenF1L2algebra

For the forward direction, suppose n=x2+y2 and let q≡3(mod4) divide n. By [L2], x=qx1 and y=qy1, so n=q2n1 with n1=x12+y12.

2.1step 1.1step 1.2L1F1algebra

Repeatedly applying [L1] to the finite list of factors from step 1.2 gives a representation of their product n; step 1.1 supplies the empty-list case.

2.2step 1.3L5L6algebra

By [L5] and [L6], step 1.3 lowers the q-adic valuation by exactly two: vq(n1)=vq(n)−2.

3.1step 1.3step 2.2L7discharge-induction

If vq(n) were odd, induction on the number of two-step reductions in steps 1.3 and 2.2 would eventually give a represented integer of q-valuation one. Applying step 1.3 once more would make its valuation at least two, a contradiction. Thus vq(n) is even.

4.1step 2.1step 3.1∎

Steps 2.1 and 3.1 prove the reverse and forward directions, respectively.

LemmaStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

Coprime primitively represented factors have a primitive product representation

Statement

If P=a2+b2 and Q=c2+d2 are primitive representations with gcd⁡(P,Q)=1, then the Brahmagupta–Fibonacci construction gives a primitive representation of PQ. In particular, (ac−bd,ad+bc) is primitive.

Facts & Assumptions

Given: Primitive representations P=a2+b2, Q=c2+d2, with gcd⁡(P,Q)=1.

[F1]

A two-square representation is primitive when its coordinate gcd is 1 (Representations and primitive representations as sums of two squares).

[L1]

For all integers a,b,c,d, (a2+b2)(c2+d2)=(ac−bd)2+(ad+bc)2=(ac+bd)2+(ad−bc)2 (The Brahmagupta–Fibonacci two-square identity).

[F2]

An integer d is a common divisor of a and b when d∣a and d∣b (Common divisor, and the greatest common divisor gcd⁡(a,b), with the convention gcd⁡(0,0):=0).

[L3]

If a prime ℓ divides uv, then ℓ∣u or ℓ∣v (Euclid's lemma: if p is prime and p∣ab then p∣a or p∣b).

Proof

technique · contradiction
1.1givenF1L1construct

Put X=ac−bd and Y=ad+bc. By [L1], X2+Y2=PQ.

1.2F2L2assume-contrachoose

Suppose, for contradiction, that (X,Y) is not primitive. Its positive gcd then exceeds one, so choose by [L2] a prime ℓ dividing both X and Y.

2.1step 1.2F1L3algebra

The combinations aX+bY=cP and aY−bX=dP are divisible by ℓ. Since (c,d) is primitive, ℓ cannot divide both; applying [L3] to the combination with coefficient not divisible by ℓ gives ℓ∣P.

2.2step 1.2F1L3algebra

Similarly, cX+dY=aQ and cY−dX=bQ. Primitivity of (a,b) and [L3] give ℓ∣Q.

3.1step 1.1step 2.1step 2.2F1F2discharge-contradiction∎

Steps 2.1 and 2.2 contradict gcd⁡(P,Q)=1. Hence (X,Y) is primitive and, by step 1.1, primitively represents PQ.

LemmaStatement: Literature-sourcedProof: AI-adaptedprecheck passaudited 2026-08-24Open item page →

Powers of primes congruent to 1 modulo 4 have primitive two-square representations

Statement

Every natural power of a prime congruent to 1 modulo 4 has a primitive two-square representation.

Facts & Assumptions

Given: A prime p≡1(mod4) and an exponent e∈N.

[F1]

A two-square representation is primitive when its coordinate gcd is 1 (Representations and primitive representations as sums of two squares).

[L1]

For all integers a,b,c,d, (a2+b2)(c2+d2)=(ac−bd)2+(ad+bc)2=(ac+bd)2+(ad−bc)2 (The Brahmagupta–Fibonacci two-square identity).

[L2]

A prime p is a sum of two integer squares if and only if p=2 or p≡1(mod4) (Fermat's two-square theorem for primes).

[L4]

If a prime ℓ divides uv, then ℓ∣u or ℓ∣v (Euclid's lemma: if p is prime and p∣ab then p∣a or p∣b).

[L5]

If a property holds at 0 and passes from e to e+1, it holds for every e∈N (The principle of mathematical induction).

Proof

technique · induction
1.1F1basealgebra

The pair (1,0) primitively represents p0=1.

1.2givenL2F1choosealgebra

By [L2], choose a,b with p=a2+b2. Neither coordinate is zero, and divisibility of either coordinate by p would force divisibility of the other and then p2∣p; in particular p divides neither coordinate. Any common prime divisor would have square dividing p, so (a,b) is primitive; the coordinates have opposite parity because p is odd.

2.1ihstep 1.2F1L1construct

Assume pe=x2+y2 primitively. The two sign variants in [L1] give representations of pe+1 with coordinate pairs (ax−by,ay+bx) and (ax+by,ay−bx).

3.1step 2.1L3L4L6algebra

If a prime ℓ divides both coordinates of either candidate, then ℓ2∣pe+1 by step 2.1. The uniqueness of prime exponents in [L6], or [L4] iterated through the power, forces ℓ=p.

3.2step 2.1step 1.2L4ihalgebra

If both candidates were coordinatewise divisible by p, their sums and differences would show that p divides 2ax,2ay,2bx,2by. Since p is odd and neither a nor b is divisible by p, [L4] would give p∣x and p∣y, contradicting the induction hypothesis.

4.1step 1.1step 3.1step 3.2L3F1L5discharge-induction∎

Thus at least one candidate has no common prime divisor; by [L3] its coordinate gcd cannot exceed one, so it is primitive. Step 1.1 and [L5] complete the induction.

TheoremStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

Characterisation of primitive sums of two squares

Statement

A positive integer n has a primitive two-square representation if and only if v2(n)≤1 and no prime q≡3(mod4) divides n.

Facts & Assumptions

Given: A positive integer n.

[F1]

A two-square representation is primitive when its coordinate gcd is 1 (Representations and primitive representations as sums of two squares).

[L1]

If q≡3(mod4) is prime and q∣x2+y2, then q∣x and q∣y (A prime congruent to 3 modulo 4 divides both coordinates of a divisible two-square sum).

[L2]

If P=a2+b2 and Q=c2+d2 are primitive representations with gcd⁡(P,Q)=1, then the Brahmagupta–Fibonacci construction gives a primitive representation of PQ (Coprime primitively represented factors have a primitive product representation).

[L3]

Every natural power of a prime congruent to 1 modulo 4 has a primitive two-square representation (Powers of primes congruent to 1 modulo 4 have primitive two-square representations).

[L5]

For a prime p and a nonzero integer n, and every k∈N: pk∣n if and only if k≤vp(n); in particular vp(n)≥1 if and only if p∣n (For a prime p and a nonzero integer a: pvp(a)∣a and pvp(a)+1∤a; pk∣a holds exactly for k≤vp(a); vp(a)≥1 exactly when p∣a; vp(1)=vp(−1)=0; and vp(p)=1).

[L6]

For a finite pairwise-coprime list with partial products Pk, one has gcd⁡(Pk,nj)=1 whenever k≤j (For a finite pairwise-coprime list of positive integers, the product divides every common multiple, and each initial product is coprime to every remaining modulus).

[L7]

If a prime p divides ab, then p∣a or p∣b (Euclid's lemma: if p is prime and p∣ab then p∣a or p∣b).

[L8]

If a property holds at 0 and passes from j to j+1, it holds for every j∈N (The principle of mathematical induction).

Proof

technique · direct
1.1givenF1L1

For the forward direction, if n=x2+y2 primitively and a prime q≡3(mod4) divided n, [L1] would make q divide both coordinates, contrary to [F1].

1.2F1L5algebra

Squares modulo 4 show that 4∣x2+y2 forces both x and y even. Thus a primitive representation has 4∤n, and the divisibility clause of [L5] at p=2, k=2 makes that equivalent to v2(n)≤1.

1.3givenL4L5L7algebra

For the reverse direction, assume the two stated prime conditions. In [L4], no three-mod-four prime occurs, the factor 2 occurs with exponent at most one, and all remaining nontrivial factors are powers of distinct primes congruent to one modulo four. The factors are pairwise coprime by uniqueness and [L7].

2.1step 1.3L3F1construct

The possible factor 2 has the primitive representation (1,1), and every one-mod-four prime power has a primitive representation by [L3].

3.1step 1.3step 2.1L2L6L8F1discharge-induction

Combine these pairwise-coprime primitive representations one at a time using [L2]. The partial product is coprime to the next factor by [L6], so [L8] completes the finite induction. If the factor list is empty, n=1 and (1,0) is primitive.

4.1step 1.1step 1.2step 3.1∎

Steps 1.1 and 1.2 prove necessity, while step 3.1 proves sufficiency.

CorollaryStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

Primitive sums of two squares are closed under products unless both factors are even

Statement

Let m,n be positive integers that have primitive two-square representations. If m and n are not both even, then mn has a primitive two-square representation.

Facts & Assumptions

Given: Positive primitively represented integers m,n.

[L1]

A positive integer n has a primitive two-square representation if and only if v2(n)≤1 and no prime q≡3(mod4) divides n (Characterisation of primitive sums of two squares).

Proof

technique · direct
1.1givenL1L2L3

By [L1] and [L3], every prime congruent to three modulo four has valuation zero in each factor. By [L2], its valuation in the product is zero, so [L3] shows that it does not divide the product.

1.2givenL1L2L3algebra

Again by [L1]–[L3], v2(mn)=v2(m)+v2(n)≤1 because at least one of m,n is odd and therefore has 2-adic valuation zero.

2.1step 1.1step 1.2L1∎

The two conditions in [L1] hold for mn, so the product has a primitive two-square representation.

CorollaryStatement: Literature-sourcedProof: AI-adaptedprecheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

Divisors greater than one of primitively represented integers are primitively represented

Statement

If a positive integer n has a primitive two-square representation and d>1 divides n, then d has a primitive two-square representation.

Facts & Assumptions

Given: A primitively represented positive integer n and a divisor d>1 of n.

[L1]

A positive integer n has a primitive two-square representation if and only if v2(n)≤1 and no prime q≡3(mod4) divides n (Characterisation of primitive sums of two squares).

Proof

technique · direct
1.1givenL1L2

Since d∣n, the divisibility criterion in [L2] gives vp(d)≤vp(n) for every prime p. Thus v2(d)≤1, and no three-mod-four prime can divide d, because none divides n by [L1].

2.1step 1.1L1∎

The two inherited conditions in step 1.1 satisfy [L1], so d has a primitive two-square representation.

CorollaryStatement: AI-adaptedProof: AI-generatedprecheck passjudge pass (deepseek-v4-pro + claude-opus-5[1m])audited 2026-08-24Open item page →

Squarefree sums of two squares

Statement

A squarefree positive integer is a sum of two squares if and only if none of its odd prime factors is congruent to 3 modulo 4; every such representation is primitive.

Facts & Assumptions

Given: A squarefree positive integer n.

[F1]

A positive integer n is squarefree if no square of a prime divides n; equivalently, every exponent in its canonical prime factorisation is 0 or 1 (Squarefree positive integers).

[L1]

A positive integer n is a sum of two squares if and only if every prime q≡3(mod4) occurs to an even exponent in its canonical prime factorisation (Characterisation of positive integers that are sums of two squares).

[L2]

A positive integer n has a primitive two-square representation if and only if v2(n)≤1 and no prime q≡3(mod4) divides n (Characterisation of primitive sums of two squares).

[F2]

An integer d is a common divisor of a and b when d∣a and d∣b (Common divisor, and the greatest common divisor gcd⁡(a,b), with the convention gcd⁡(0,0):=0).

[L4]

If a prime p divides ab, then p∣a or p∣b (Euclid's lemma: if p is prime and p∣ab then p∣a or p∣b).

Proof

technique · direct
1.1F1L1algebra

By [F1], every prime exponent of n is zero or one. Consequently the even-exponent condition in [L1] for a prime congruent to three modulo four is equivalent to that prime not dividing n.

1.2F1F2L3L4assume-contraalgebradischarge-contradiction

To see that every representation is primitive, suppose n=x2+y2 and gcd⁡(x,y)>1. By [L3] choose a prime ℓ dividing the gcd. Then ℓ∣x and ℓ∣y by [F2], so ℓ2∣n, contradicting [F1].

2.1step 1.1L2F1

Squarefreeness also gives v2(n)≤1, so the same exclusion of three-mod-four primes satisfies [L2] and yields a primitive representation whenever n is represented.

3.1step 1.1step 2.1step 1.2∎

Step 1.1 proves the representation criterion, step 2.1 supplies primitivity under that criterion, and step 1.2 shows that every representation has it.

5 · Examples, counterexamples and false statements

None yet.

Sources