Sums of Squares
A. Student
October 2026
Abstract
A short article: sections, numbered equations, theorems with proofs, and cross-references.
1Introduction
Which integers are sums of two squares? We collect the classical answer; see Theorem
2.3 and Section
3.
2Statement
Definition 2.1. An integer
n≥0 is a
sum of two squares if
n=a2+b2 for some
a,b∈Z.
Lemma 2.2. Products of sums of two squares are sums of two squares:
(a2+b2)(c2+d2)=(ac−bd)2+(ad+bc)2.(1)
Theorem 2.3 (Fermat)
. An odd prime p is a sum of two squares if and only if p≡1(mod4).
3Proof sketch
Proof. If
p=a2+b2, then
p≡1(mod4), since squares are
0 or
1 modulo
4. Conversely, choose
x with
x2≡−1(modp) and apply Thue’s lemma; by
(1) the rest follows.
∎
n=1∑∞n21=6π2,∫01xndx=n+11.(2)