You are on page 1of 43

2014 PUMAC POWER ROUND

BCA 1

Contents
1. Problem 1 2
2. Problem 2 4
3. Problem 3 10
4. Problem 4 19
5. Problem 5 20
6. Problem 6 23
7. Problem 7 28
8. Problem 8 30
9. Problem 9 36
10. Problem 10 37
11. Bonus Problems 43

Date: November 22, 2014.


1
PUMAC POWER ROUND PROBLEM 1 BCA 1
1. Problem 1
Proposition 1.1. The polynomial
X
f (x1 , x2 , . . . , xn ) = ai,j xi xj
1≤i,j≤n

is integral if and only if ai,i ∈ Z and ai,j + aj,i ∈ Z for all i and j.
Proof. We first show that if ai,i ∈ Z and ai,j + aj,i ∈ Z for all i, j, then f is integral. Note
that
X
f (x1 , x2 , . . . , xn ) = ai,j xi xj
1≤i,j≤n
X X X
= ai,i x2i + ai,j xi xj + aj,i xj xi
1≤i≤n 1≤i<j≤n 1≤j<i≤n
X X
= ai,i x2i + (ai,j + aj,i )xi xj
1≤i≤n 1≤i<j≤n

As Z is closed under both addition and multiplication, f (x1 , x2 , . . . , xn ) ∈ Z when x1 , x2 , . . . , xn ∈


Z as desired.
We now show that if f is integral, then ai,i ∈ Z and ai,j + aj,i ∈ Z for all i, j. Since f is
integral, f (x1 , x2 , . . . , xn ) ∈ Z for all integers x1 , x2 , . . . , xn . In particular, when x1 = x2 =
. . . = xi−1 = 0, xi = 1, xi+1 = xi+2 = . . . = xn = 0, we have
f (x1 , x2 , . . . , xn ) = ai,i · 12 = ai,i ∈ Z
for all i. Furthermore, when x1 = x2 = . . . = xi−1 = 0, xi = 1, xi+1 = xi+2 = . . . = xj−1 =
0, xj = 1, xj+1 = xj+2 = . . . = xn = 0, we have
f (x1 , x2 , . . . , xn ) = ai,i + ai,j + aj,i + aj,j ∈ Z
but we have already established that ai,i , aj,j are integers. Since −1 is an integer and Z is
closed under multiplication, this implies that −ai,i , −aj,j are integers as well. Hence, as Z is
closed under addition, we have
(ai,i + ai,j + aj,i + aj,j ) + (−ai,i ) + (−aj,j )
= ai,j + aj,i ∈ Z
for any i, j, as desired.

Proposition 1.2. Find an integral conic polynomial that does not have integer matrix.
Proof. We claim that the conic polynomial f (x, y) = xy is integral but does not have integer
matrix. As the product of any two integers is itself an integer, f is integral. Since f is
defined in two variables, the matrix M associated with f is of size 2 × 2. By definition, it is
sufficient to show that if M is symmetric, then it is not integral. Suppose otherwise for the
sake of contradiction. Let the symmetric matrix of f be:
 
a b
b c
2
BCA 1 PROBLEM 1 BCA 1

Thus, f can be expressed in the form:


  
 a b x
x y
b c y
Multiplying the matrices out, we get
    
 a b x  x
x y = ax + by cx + dy = ax2 + 2bxy + cy 2
b c y y
which holds for all x, y. In particular, we have f (1, 0) = a = 0 and f (0, 1) = c = 0, hence
f (1, 1) = 0 + 2b + 0 = 2b = 1. But b is thus not an integer, and the conic polynomial
f (x, y) = xy is not associated with an integer symmetric matrix as desired. 
Proposition 1.3. Find a conic polynomial with two or less variables that can represent all
integers.
Proof. We claim that the conic polynomial f (x, y) = xy satisfies both conditions. Clearly,
f is defined using two variables. It remains to show that f can represent all integers. But
f (n, 1) = n · 1 = n, hence f can represent all integers n as desired. 
Proposition 1.4. What integers can the following conic polynomials represent? A good
answer should (1) be exhaustive (should not leave out representable integers), (2) be correct
(should not say an integer is representable when if it’s not), (3) prove 1 and 2 (the proof can
be concise).
(a) f (x, y) = x2 − y 2
(b) f (x, y) = x2 − 4xy + 4y 2
(c) f (x, y, z) = x2 − y 2 + z 2
Proof. (a) I claim that f (x, y) = x2 − y 2 represents every integer n satisfying n 6≡ 2
(mod 4). Note that f (k + 1, k) = (k + 1)2 − k 2 = 2k + 1, hence f can represent
every odd integer. Furthermore, f (k + 1, k − 1) = (k + 1)2 − (k − 1)2 = 4k, hence f
can represent every multiple of 4. It remains to show that f (x, y) cannot represent n
when n ≡ 2 (mod 4). Note that the quadratic residues modulo 4 are 0 and 1, hence
x2 − y 2 ≡ 02 − 02 ≡ 0, 02 − 12 ≡ −1, 12 − 02 ≡ 1, or 12 − 12 ≡ 0 (mod 4), hence
x2 − y 2 6≡ 2 (mod 4) for any x, y. Hence f cannot represent any n ≡ 2 (mod 4),
completing the proof.
(b) I claim that f (x, y) = x2 − 4xy + 4y 2 represents every perfect square. We first
show that f represents every perfect square n = k 2 . Note that f (k, 0) = k 2 = n,
establishing that f represents n. It remains to show that f does not represent any
non-square n. Suppose otherwise. Let n = a2 b where b is squarefree. Since √ n is not
2 2
a square, b > 1. Then f (x, √y) = (x − 2y) = n = a b =⇒ x − 2y √ = a b. But as
b is squarefree and not 1, b is not an integer, and so either is a b, contradiction.
Therefore f represents all perfect squares.
(c) I claim that f (x, y, z) = x2 − y 2 + z 2 represents every integer n. We first show that f
represents all odd integers n = 2k + 1. Note that f (k + 1, k, 0) = (k + 1)2 − k 2 + 02 =
2k + 1 = n, so f represents all odd integers. We now show that f represents all even
integers n = 2k. Note that f (k, k −1, 1) = k 2 −(k −1)2 +12 = 2k = n, so f represents
all even integers as well. Since every integer is either odd or even, f represents all
integers as desired.

3
PUMAC POWER ROUND PROBLEM 2 BCA 1

2. Problem 2
Definition 2.1. Let R be a ring. We say R is an integral domain if for any a, b ∈ R, ab =
0 ⇒ a = 0 or b = 0.
Definition 2.2. In a ring R, a prime is a non-unit p ∈ R such that for all a, b ∈ R,
p | ab ⇒ p | a or p | b.
Definition 2.3. In a ring R, an irreducible is a non-unit p ∈ R such that p cannot be written
as the product of two non-units in R.
Lemma 2.4. For any integral domain R, all primes are also irreducible.
Proof. We will prove the contrapositive: If p ∈ R is not irreducible, then p is not prime in
R, thus proving the statement of the proposition. Suppose p ∈ R is not irreducible. Then
there exist non-units a, b ∈ R such that ab = p. Suppose, by contradiction, that p is prime.
We have p | ab ⇒ p | a or p | b. Suppose, without loss of generality, that p | a. We have p | a
and a | p. Thus, there exist i, j ∈ R such that a = pi and p = aj. Thus, we have:
a = pi
= (aj)i
= a(ji)
Thus, ji = 1 by the uniqueness of the multiplicative identity in rings. This means that j is
a unit. However, we have aj = ab = p, a 6= 0. Thus, b = j, contradicting the fact that b is
not a unit.
Thus, all primes are irreducible. 
Definition 2.5. For an integral domain R, a Euclidean Function is a function f : R −{0} →
N such that the following hold:
(1) For all a, b ∈ R − {0}, f (a) ≤ f (ab), and
(2) For all a, b ∈ R, ∃q, r ∈ R such that a = bq + r and either r = 0 or f (r) < f (b).
We call R a Euclidean Domain if R has a Euclidean function.
Definition 2.6. A Unique Factorization Domain (UFD) is an integral domain such that
the following hold:
(1) All irreducibles are prime.
(2) All nonzero non-units can be represented as the product of irreducibles uniquely up
to a unit.
Definition 2.7. Let R be an integral domain. For a, b ∈ R, a gcd of a and b is a number
d ∈ R such that d | a and d | b and for all c ∈ R such that c | a and c | b, c | d. We say
gcd(a, b) = d if d is a gcd of a and b.
Definition 2.8. If R is a ring, then we say two elements a and b of R are associate if and
only if a = ub for some unit u .
Lemma 2.9. Let R be a Euclidean ring. For all a, b ∈ R, a and b not both zero, if d is a
gcd of a and b, then there exist x, y ∈ R such that ax + by = d.
Proof. Let f (x) be a Euclidean function of R. Suppose a, b ∈ R are such that a and b are
not both zero and gcd(a, b) = d. Let S = {ax + by | x, y ∈ R and ax + by 6= 0}. For all
4
BCA 1 PROBLEM 2 BCA 1

x, y ∈ R, we have d | ax and d | by, so d | ax + by. This means that all elements of S are
divisible by d.
Let T = {f (z) | z ∈ S}. Since f (x) is a Euclidean function, by definition, f (z) ∈ N for
all z ∈ S. Thus, T ⊂ N. Furthermore, we are given that at least one of a or b is nonzero, so
without loss of generality, suppose a 6= 0. We have 1 ∈ R and a · 1 + b · 0 = a · 1 = a 6= 0,
so a ∈ S. Thus, S is nonempty. That means that T is also nonempty. Thus, by the
well-ordering principle, T has a least element.
Let x0 and y0 be elements of R such that f (ax0 +by0 ) is equal to the least element of T . We
have that ax0 + by0 6= 0, so this means that there exist q, r ∈ R such that a = (ax0 + by0 )q + r
and f (r) < f (ax0 + by0 ). However, we have that r = a(1 − x0 q) + b(−y0 q), so either r ∈ S
or r = 0. If r ∈ S, then f (r) ∈ T . However, f (r) is less than f (ax0 + by0 ), which is the least
element of T , a contradiction. Thus, r = 0. This means that ax0 + by0 | a.
By an identical argument, ax0 + by0 | b. Thus, ax0 + by0 | d. However, ax0 + by0 ∈ S, and
we showed that d divides all elements of S. Thus, ax0 + by0 and d are associate. This means
that there exists a unit u in R such that d = u(ax0 + by0 ). For our solution (x, y), we can
take x = x0 u and y = y0 u. We now have ax + by = d, completing the proof. 
Lemma 2.10. Let R be a Euclidean ring. For all a, b, c ∈ R, a | bc and gcd(a, b) = 1 ⇒ a | c.
Proof. Let a, b, c ∈ R be such that a | bc and gcd(a, b) = 1. By the Lemma 2.9, we can find
x, y ∈ R such that ax + by = 1. We have c = axc + byc = axc + bcy. We have a | axc and
we are given that a | bc, so a | bcy. Thus, a | axc + bcy = c. 
Lemma 2.11. Let R be a Euclidean ring. Let f (x) be a Euclidean function of R. If
b ∈ R − {0} is not a unit, then for all a ∈ R − {0}, f (ab) > f (a).
Proof. Suppose a, b ∈ R are such that b is a nonzero non-unit and a 6= 0. We have that
there exist q, r ∈ R such that a = (ab)q + r and f (r) < f (ab) or r = 0. If r = 0, then
a = (ab)q = a(bq) ⇒ bq = 1. However, this contradicts the condition that b is not a unit.
Thus, f (r) < f (ab). We have r = a − abq = a(1 − bq). Thus, by the definition of a Euclidean
function, f (a) ≤ f (a(1 − bq) = f (r) < f (ab). 
Lemma 2.12. Let R be a Euclidean ring. All nonzero non-units in R are the product of
irreducibles.
Proof. Let f (x) be a Euclidean function of R. Let S = {a | a ∈ R, a 6= 0 is a non-unit
and not the product of irreducibles}. Let T = {f (z) | z ∈ S}. We see that T ⊂ N, by the
definition of a Euclidean function.
Suppose, by contradiction, that S is nonempty. Then T is also nonempty. Thus, by
the well-ordering principle, T has a least element. Let a ∈ S be such that f (a) is the least
element of T . If a is irreducible, we have reached our contradiction, because a can be written
as the product of irreducibles: itself. Suppose a is not irreducible. Then we have that a = bc,
where b, c ∈ R are non-units. By the previous proposition, f (b) < f (a) and f (c) < f (a).
Thus, since f (a) is the least element of T , f (b) ∈ / T and f (c) ∈ / T ⇒ b and c are both
products of irreducibles. However, this means a = bc is also a product of irreducibles, a
contradiction. Thus, all elements of R are products of irreducibles. 
Lemma 2.13. All Euclidean domains are UFD’s.
Proof. Let R be a Euclidean ring. Let p be an irreducible in R, and let a, b ∈ R be such that
p | ab. We wish to prove that either p | a or p | b. Since p is irreducible, its only divisors are
5
PUMAC POWER ROUND PROBLEM 2 BCA 1

units and its associates. Thus, either gcd(p, a) = p or gcd(p, a) = 1. If gcd(p, a) = p, then
p | a and we are done. Suppose gcd(p, a) = 1. Then by Lemma 2.10, p | b. Thus, p must
divide one of a or b, which means p is prime. Thus, all irreducibles of R are prime.
Let R be a Euclidean ring with Euclidean function f (x). We already showed that all
nonzero non-units can be represented as the product of irreducibles. We wish to prove that
this product is unique up to a unit.
Let S = {a ∈ R | a is a nonzero non-unit that does not factor uniquely as the product of
primes} and let T = {f (z) | z ∈ S}. Since 0 ∈ / S, T ⊂ N. Suppose, by contradiction, that S
is nonempty. This means that T is also nonempty. Thus, by the well-ordering principle, T
has a least element.
Let a ∈ S be such that f (a) is the least element of T . We know that a has at least two
different representations as the product of irreducibles. Let p1 , p2 , . . . , pn , q1 , q2 , . . . , qm be
irreducibles such that p1 p2 · · · pn = q1 q2 · · · qm = a and there exists some pi such that pi is
not associate to qj for all 1 ≤ j ≤ m. We have shown that all irreducibles are prime, so p1 is
prime. We have p1 | q1 q2 · · · qm ⇒ p1 | qi for some i between 1 and m. We can write this as
qi = p1 k for some k ∈ R. However, qi is irreducible, and p1 is not a unit, so by the definition
of an irreducible, k is a unit. Thus, p2 p3 · · · pn = kq1 q2 · · · qi−1 qi+1 · · · qm . However, we have
that p1 and qi are non-units, so by Lemma 2.11, f (p2 p3 · · · pn ) = f (kq1 q2 · · · qi−1 qi+1 · · · qm ) <
f (p1 p2 · · · pn ) = f (a). Thus, since f (a) is the least element of T , f (p2 p3 · · · pn ) ∈ / T.
This means p2 p3 · · · pn ∈ / S. However, we have p2 p3 · · · pn = kq1 q2 · · · qi−1 qi+1 · · · qm can be
factored uniquely as the product of irreducibles, which means that {p2 , p3 , . . . , pn } is a per-
mutation of associates of {kq1 , q2 , . . . , qi−1 , qi+1 , . . . , qm }. However, we have a = p1 p2 · · · pn =
p1 kq1 q2 · · · qi−1 qi+1 · · · qm = q1 q2 · · · qm , so {p1 , p2 , . . . , pn } is a permutation of associates of
{q1 , q2 , . . . , qm }, contradicting the condition that p1 p2 · · · pn and q1 q2 · · · qm are distinct fac-
torizations of a. Thus, S is empty, and we are done. 

Let Z[i] be the smallest ring containing Z and i, where i2 = −1.

Lemma 2.14. Z[i] = {a + bi | a, b ∈ Z}.

Proof. Let S = {a + bi | a, b ∈ Z}. We have Z ⊂ C and i ∈ C. Thus, Z[i] ⊂ C. Let T be


an arbitrary subring of C that contains Z and i. Clearly, Z ⊂ T . Furthermore, since T is
a ring, it is closed under multiplication, so it contains all complex numbers of the form ai,
where a ∈ Z. T is closed under addition, so it contains all complex numbers of the form
a + bi, where a, b ∈ Z. Thus, S ⊂ T .
We will now show that S is a ring. We must show the following:
(1) For any z ∈ S, z · 1 = z
(2) For any z ∈ S, z + 0 = z
(3) For any x, y, z ∈ S, (x + y) + z = x + (y + z) and (xy)z = x(yz)
(4) For any x, y ∈ S, x + y = y + x
(5) For any x, y, z ∈ S, x(y + z) = xy + xz
(6) For any z ∈ S, ∃y ∈ S such that z + y = 0
(7) S is closed under addition
(8) S is closed under multiplication
Note that properties (1) through (5) follow directly from the fact that S ⊂ C. For property
(6), let z = a + bi, with a, b ∈ Z. Consider y = −a − bi. We have −a ∈ Z and −b ∈ Z, so
6
BCA 1 PROBLEM 2 BCA 1

y ∈ S. Note that:
z + y = (a + bi) + (−a − bi)
= (a + (−a) + (b + (−b))i
= 0 + 0i
=0
Thus, property (6) holds. Furthermore, we can check that properties (7) and (8) hold.
Suppose a, b, c, d ∈ Z. We have (a+bi)+(c+di) = (a+c)+(b+d)i ∈ S and (a+bi)(c+di) =
(ac − bd) + (ad + bc)i ∈ S.
We now know that S is a ring and that for all rings T ⊂ C that contain Z and i, S ⊂ T .
Thus, S = Z[i]. 
Definition 2.15. The norm of α, written as N (α), is defined as follows:
N : C → R+ ∪ {0}
a + bi 7→ a2 + b2 .
Lemma 2.16. For all x, y ∈ C, N (x)N (y) = N (xy).
Proof. Let x = a+bi and y = c+di, for some a, b, c, d ∈ R. We have xy = (ac−bd)+(ad+bc)i.
We have:
N (x)N (y) = (a2 + b2 )(c2 + d2 )
= a2 c2 + a2 d2 + b2 c2 + b2 d2
= (ac − bd)2 + (ad + bc)2
= N (xy)

Lemma 2.17. N (x) is a Euclidean function for Z[i].
Proof. We have N (x) ≥ 1 for all x ∈ Z[i] − {0}. Thus, we have N (ab) = N (a)N (b) ≥
N (a) · 1 = N (a), for all a, b ∈ Z[i], none of them equal to 0.
We must now show that for all a, b ∈ Z[i], there exist q, r ∈ Z[i] such that a = bq + r and
N (r) < N (b). We have r = a − bq = b ab − q . Thus, since

a
 the norma is multiplicative, we
must show that there exists q in Z[i] such that N b − q < 1. Let b = x + yi, for some
x, y ∈ R.
For all t ∈ R, let {t} be the fractional part of t and let [t] be the greatest integer in t. Let
j = [x] if {x} ≤ 1/2 or [x] + 1 if {x} > 1/2 and k = [x] if {y} ≤ 1/2 or [y] + 1 if {y} > 1/2.
2 2
If we choose q = j + ki, we have N ab − q = (x − j)2 + (y − k)2 ≤ 12 + 21 = 12 < 1. Thus,

we can choose q = j + ki and r = a − bq to complete our proof. 
Lemma 2.18. All rational primes of the form 4k + 3 are irreducible in Z[i].
Proof. Let p be a rational prime of the form 4k + 3. Suppose, by contradiction, that p is not
irreducible in Z[i]. We have p = ab for some a, b ∈ Z[i], a and b non-units.
By Lemma 2.11, N (a) < N (p) = p2 and N (b) < N (p) = p2 . However, we have
N (a)N (b) = N (p) = p2 ⇒ N (a) = N (b) = p. However, N (a) is of the form x2 + y 2 ,
with x, y ∈ Z, which clearly cannot be of the form 4k + 3, a contradiction. Thus, p is
irreducible in Z[i]. 
7
PUMAC POWER ROUND PROBLEM 2 BCA 1

Lemma 2.19. If π ∈ Z[i] is such that N (π) is an irreducible of Z, then π is irreducible in


Z[i].
Proof. Suppose π is an element of Z[i] such that N (π) is irreducible in Z. We wish to prove
that π is irreducible in Z[i]. It is necessary and sufficient to show that if π = ab for some
a, b ∈ Z[i], then one of a or b is a unit. Suppose a, b ∈ Z[i] are such that π = ab. We have
N (a)N (b) = N (ab) = N (π). However, we have that N (π) is irreducible in Z, so either N (a)
or N (b) is a unit. Suppose, without loss of generality, that N (a) is a unit of Z. We know
that N (a) ∈ N ∪ {0}. However, the only unit in N ∪ {0} is 1. Thus, N (a) = 1 ⇒ a is a unit.
Thus, π is irreducible in Z[i]. 
Lemma 2.20. If p is a rational prime of the form 4k + 1, then p is not irreducible in Z[i].
Proof. Let p be a rational prime of the form 4k + 1. We already showed that all irreducibles
are prime in Z[i], so it suffices to show that p is not prime in Z[i]. Recall Wilson’s theorem:
(p − 1)! ≡ −1 (mod p). We have p − a ≡ −a (mod p), so we can rewrite this as (p − 1)! =
p−1 p−1
(−1) 2 (( p−1
2
)!)2 . Since p is of the form 4k + 1, p−1
2
is even. Thus, (−1) 2 = 1. We now
have (( p−1
2
)!)2 ≡ (p − 1)! ≡ −1 (mod p). Let k = (( p−1 2
)!). We have k 2 ≡ −1 (mod p)
⇒ p | k 2 + 1. We have k 2 + 1 = (k + i)(k − i). Suppose, by contradiction, that p is prime
in Z[i]. This means that p | (k + i)(k − i) ⇒ p | k + i or p | k − i. However, both of these
cases yield a contradiction, because in each case, p must divide either 1 or −1, each of which
contradict the fact that primes are non-units. Thus, p is not prime in Z[i], and thus not
irreducible. 
Lemma 2.21. If n ∈ Z is the sum of two integer squares, then for all rational primes p of
the form 4k + 3, pr || n ⇒ 2 | r.
Proof. Let n be the sum of two integer squares. We wish to show that each prime of the form
4k + 3 has even multiplicity in the prime factorization of n. Let n = a2 + b2 , for some integers
a and b. We have n = a2 +b2 = (a+bi)(a−bi). Let p be a prime of the form 4k+3 that divides
n. We showed in the preliminaries that p is prime in Z[i]. This means that p | n ⇒ p | a + bi
or p | a − bi. However, we have that p is a rational integer. That means that if p divides
a + bi in Z[i], p | a and p | b ⇒ p | a − bi. Similarly, p | a − bi ⇒ p | a and p | b ⇒ p | a + bi.
Thus, p2 | (a + bi)(a − bi) = n. We have now shown that either  p - n or p2 |n. For higher
multiplicities of p, we can divide n by p2 to obtain n = p2 ap + pb i ap − pb i . We can use
     
the same argument with ap + pb i ap − pb i to show that either p - ap + pb i ap − pb i or
     
p2 | ap + pb i ap − pb i . We can continue this process until p - pak + pbk i pak − pbk i . Thus,
p has even multiplicity in the prime factorization of n. 
Proposition 2.1. Assume positive integers m, n are both representable by the conic polyno-
mial f (x, y) = x2 + y 2 . Then so is mn.
Proof. Suppose m and n are both sums of two integer squares. We have m = a2 + b2 and
n = c2 + d2 for some integers a, b, c, d. We have
mn = (a2 + b2 )(c2 + d2 )
= a2 c 2 + a2 d 2 + b 2 c 2 + b 2 d 2
= (ac − bd)2 + (ad + bc)2 ,
8
BCA 1 PROBLEM 2 BCA 1

which is the sum of two integer squares. 


Proposition 2.2. If p is a prime of the form 4k + 3, then p | x2 + y 2 implies p | x and p | y.
Proof. Suppose p is a prime of the form 4k + 3, and x, y ∈ Z are such that p | x2 + y 2 . We
have x2 + y 2 = (x + yi)(x − yi). By Lemma 2.17, Z[i] is a Euclidean domain. By Lemma
2.13, Z[i] is a UFD. By Lemma 2.18, p is irreducible in Z[i], and since Z[i] is a UFD, p is
therefore prime. Thus, either p | x + yi or p | x − yi in Z[i]. In either situation, p must divide
both x and y. 
Proposition 2.3. If p is a prime of the form 4k + 1, then t2 ≡ −1 (mod p) has a solution
t ∈ Z.
Proof. Recall Wilson’s theorem: (p − 1)! ≡ −1 (mod p). We have p − a ≡ −a (mod p), so we
p−1
can rewrite this as (p − 1)! ≡ (−1) 2 (( p−1
2
)!)2 (mod p). Since p is of the form 4k + 1, p−1
2
is
p−1 p−1 p−1
2
even. Thus, (−1) 2 = 1. We now have (( 2 )!) ≡ (p − 1)! ≡ −1 (mod p). Let t = (( 2 )!).
We have t2 ≡ −1 (mod p) ⇒ p | t2 + 1. Thus, t2 ≡ −1 (mod p). 
Proposition 2.4. If p is a prime of the form 4k + 1, then p is representable by the conic
polynomial f (x, y) = x2 + y 2 .
Proof. Suppose p is a prime of the form 4k + 1. By Lemma 2.20, p is not irreducible in Z[i].
Therefore, p = ab for some a, b ∈ Z[i], with a and b non-units. Since a and b are non-units,
by Lemma 2.11, N (a) < p2 and N (b) < p2 . We know that the norm is multiplicative, so
N (a)N (b) = N (ab) = N (p) = p2 . Since N (a), N (b) ∈ N, we have either one of N (a), N (b)
is 1 and one is p2 or N (a) = N (b) = p. However, we know that N (a) < p2 and N (b) < p2 ,
so N (a) = N (b) = p. Since a ∈ Z[i], we know that a = x + yi for some x, y ∈ Z. Thus, we
have p = N (a) = x2 + y 2 , and p is the sum of two integer squares. 
Proposition 2.5. A positive integer n is the sum of two integer squares if and only if all
primes of the form 4k + 3 have even multiplicity in the prime factorization of n.
Proof. In Lemma 2.21, we showed that a positive integer n is the sum of two squares only if
all primes of the form 4k + 3 have even multiplicity in the prime factorization of n. Thus, we
only need to show that if all primes of the form 4k + 3 have even multiplicity in the prime
factorization of n and n is a positive integer, then n is the sum of two integer squares.
We know that 2 is the sum of two integer squares, because 2 = 12 + 12 . Furthermore, for
any prime p of the form 4k + 3, p2 = p2 + 02 is the sum of two integer squares. Finally, by
Lemma 2.20, all primes of the form 4k + 1 are the sum of two integer squares. Thus, by
Proposition 2.1, any product of any integer of these forms is the sum of two integer squares.
This covers all of our desired integers, and we are done. 

9
PUMAC POWER ROUND PROBLEM 3 BCA 1

3. Problem 3
Definition 3.1. Let R be a ring. We say R is an integral domain if for any a, b ∈ R, ab =
0 ⇒ a = 0 or b = 0.
Definition 3.2. In a ring R, a prime is a non-unit p ∈ R such that for all a, b ∈ R,
p | ab ⇒ p | a or p | b.
Definition 3.3. In a ring R, an irreducible is a non-unit p ∈ R such that p cannot be written
as the product of two non-units in R.
Lemma 3.4. For any integral domain R, all primes are also irreducible.
Proof. We will prove the contrapositive: If p ∈ R is not irreducible, then p is not prime in
R, thus proving the statement of the lemma. Suppose p ∈ R is not irreducible. Then there
exist non-units a, b ∈ R such that ab = p. Suppose, by contradiction, that p is prime. We
have p | ab ⇒ p | a or p | b. Suppose, without loss of generality, that p | a. We have p | a
and a | p. Thus, there exist i, j ∈ R such that a = pi and p = aj. Thus, we have:
a = pi
= (aj)i
= a(ji)
Thus, ji = 1 by the uniqueness of the multiplicative identity in rings. This means that j is
a unit. However, we have aj = ab = p, a 6= 0. Thus, b = j, contradicting the fact that b is
not a unit.
Thus, all primes are irreducible. 
Definition 3.5. For an integral domain R, a Euclidean Function is a function f : R −{0} →
N such that the following hold:
(1) For all a, b ∈ R − {0}, f (a) ≤ f (ab), and
(2) For all a, b ∈ R, ∃q, r ∈ R such that a = bq + r and either r = 0 or f (r) < f (b).
We call R a Euclidean Domain if R has a Euclidean function.
Definition 3.6. A Unique Factorization Domain (UFD) is an integral domain such that
the following hold:
(1) All irreducibles are prime.
(2) All nonzero non-units can be represented as the product of irreducibles uniquely up
to a unit.
Definition 3.7. Let R be an integral domain. For a, b ∈ R, a gcd of a and b is a number
d ∈ R such that d | a and d | b and for all c ∈ R such that c | a and c | b, c | d. We say
gcd(a, b) = d if d is a gcd of a and b.
Definition 3.8. If R is a ring, then we say two elements a and b of R are associate if and
only if a = ub for some unit u .
Lemma 3.9. Let R be a Euclidean ring. For all a, b ∈ R, a and b not both zero, if d is a
gcd of a and b, then there exist x, y ∈ R such that ax + by = d.
Proof. Let f (x) be a Euclidean function of R. Suppose a, b ∈ R are such that a and b are
not both zero and gcd(a, b) = d. Let S = {ax + by | x, y ∈ R and ax + by 6= 0}. For all
10
BCA 1 PROBLEM 3 BCA 1

x, y ∈ R, we have d | ax and d | by, so d | ax + by. This means that all elements of S are
divisible by d.
Let T = {f (z) | z ∈ S}. Since f (x) is a Euclidean function, by definition, f (z) ∈ N for
all z ∈ S. Thus, T ⊂ N. Furthermore, we are given that at least one of a or b is nonzero, so
without loss of generality, suppose a 6= 0. We have 1 ∈ R and a · 1 + b · 0 = a · 1 = a 6= 0,
so a ∈ S. Thus, S is nonempty. That means that T is also nonempty. Thus, by the
well-ordering principle, T has a least element.
Let x0 and y0 be elements of R such that f (ax0 +by0 ) is equal to the least element of T . We
have that ax0 + by0 6= 0, so this means that there exist q, r ∈ R such that a = (ax0 + by0 )q + r
and f (r) < f (ax0 + by0 ). However, we have that r = a(1 − x0 q) + b(−y0 q), so either r ∈ S
or r = 0. If r ∈ S, then f (r) ∈ T . However, f (r) is less than f (ax0 + by0 ), which is the least
element of T , a contradiction. Thus, r = 0. This means that ax0 + by0 | a.
By an identical argument, ax0 + by0 | b. Thus, ax0 + by0 | d. However, ax0 + by0 ∈ S, and
we showed that d divides all elements of S. Thus, ax0 + by0 and d are associate. This means
that there exists a unit u in R such that d = u(ax0 + by0 ). For our solution (x, y), we can
take x = x0 u and y = y0 u. We now have ax + by = d, completing the proof. 
Lemma 3.10. Let R be a Euclidean ring. For all a, b, c ∈ R, a | bc and gcd(a, b) = 1 ⇒ a | c.
Proof. Let a, b, c ∈ R be such that a | bc and gcd(a, b) = 1. By the Lemma 2.9, we can find
x, y ∈ R such that ax + by = 1. We have c = axc + byc = axc + bcy. We have a | axc and
we are given that a | bc, so a | bcy. Thus, a | axc + bcy = c. 
Lemma 3.11. Let R be a Euclidean ring. Let f (x) be a Euclidean function of R. If
b ∈ R − {0} is not a unit, then for all a ∈ R − {0}, f (ab) > f (a).
Proof. Suppose a, b ∈ R are such that b is a nonzero non-unit and a 6= 0. We have that
there exist q, r ∈ R such that a = (ab)q + r and f (r) < f (ab) or r = 0. If r = 0, then
a = (ab)q = a(bq) ⇒ bq = 1. However, this contradicts the condition that b is not a unit.
Thus, f (r) < f (ab). We have r = a − abq = a(1 − bq). Thus, by the definition of a Euclidean
function, f (a) ≤ f (a(1 − bq) = f (r) < f (ab). 
Lemma 3.12. Let R be a Euclidean ring. All nonzero non-units in R are the product of
irreducibles.
Proof. Let f (x) be a Euclidean function of R. Let S = {a | a ∈ R, a 6= 0 is a non-unit
and not the product of irreducibles}. Let T = {f (z) | z ∈ S}. We see that T ⊂ N, by the
definition of a Euclidean function.
Suppose, by contradiction, that S is nonempty. Then T is also nonempty. Thus, by
the well-ordering principle, T has a least element. Let a ∈ S be such that f (a) is the least
element of T . If a is irreducible, we have reached our contradiction, because a can be written
as the product of irreducibles: itself. Suppose a is not irreducible. Then we have that a = bc,
where b, c ∈ R are non-units. By the previous lemma, f (b) < f (a) and f (c) < f (a). Thus,
since f (a) is the least element of T , f (b) ∈
/ T and f (c) ∈
/ T ⇒ b and c are both products of
irreducibles. However, this means a = bc is also a product of irreducibles, a contradiction.
Thus, all elements of R are products of irreducibles. 
Lemma 3.13. All Euclidean domains are UFD’s.
Proof. Let R be a Euclidean ring. Let p be an irreducible in R, and let a, b ∈ R be such that
p | ab. We wish to prove that either p | a or p | b. Since p is irreducible, its only divisors are
11
PUMAC POWER ROUND PROBLEM 3 BCA 1

units and its associates. Thus, either gcd(p, a) = p or gcd(p, a) = 1. If gcd(p, a) = p, then
p | a and we are done. Suppose gcd(p, a) = 1. Then by Lemma 2.10, p | b. Thus, p must
divide one of a or b, which means p is prime. Thus, all irreducibles of R are prime.
Let R be a Euclidean ring with Euclidean function f (x). We already showed that all
nonzero non-units can be represented as the product of irreducibles. We wish to prove that
this product is unique up to a unit.
Let S = {a ∈ R | a is a nonzero non-unit that does not factor uniquely as the product of
primes} and let T = {f (z) | z ∈ S}. Since 0 ∈ / S, T ⊂ N. Suppose, by contradiction, that S
is nonempty. This means that T is also nonempty. Thus, by the well-ordering principle, T
has a least element.
Let a ∈ S be such that f (a) is the least element of T . We know that a has at least two
different representations as the product of irreducibles. Let p1 , p2 , . . . , pn , q1 , q2 , . . . , qm be
irreducibles such that p1 p2 · · · pn = q1 q2 · · · qm = a and there exists some pi such that pi is
not associate to qj for all 1 ≤ j ≤ m. We have shown that all irreducibles are prime, so p1 is
prime. We have p1 | q1 q2 · · · qm ⇒ p1 | qi for some i between 1 and m. We can write this as
qi = p1 k for some k ∈ R. However, qi is irreducible, and p1 is not a unit, so by the definition
of an irreducible, k is a unit. Thus, p2 p3 · · · pn = kq1 q2 · · · qi−1 qi+1 · · · qm . However, we have
that p1 and qi are non-units, so by Lemma 2.11, f (p2 p3 · · · pn ) = f (kq1 q2 · · · qi−1 qi+1 · · · qm ) <
f (p1 p2 · · · pn ) = f (a). Thus, since f (a) is the least element of T , f (p2 p3 · · · pn ) ∈ / T.
This means p2 p3 · · · pn ∈ / S. However, we have p2 p3 · · · pn = kq1 q2 · · · qi−1 qi+1 · · · qm can be
factored uniquely as the product of irreducibles, which means that {p2 , p3 , . . . , pn } is a per-
mutation of associates of {kq1 , q2 , . . . , qi−1 , qi+1 , . . . , qm }. However, we have a = p1 p2 · · · pn =
p1 kq1 q2 · · · qi−1 qi+1 · · · qm = q1 q2 · · · qm , so {p1 , p2 , . . . , pn } is a permutation of associates of
{q1 , q2 , . . . , qm }, contradicting the condition that p1 p2 · · · pn and q1 q2 · · · qm are distinct fac-
torizations of a. Thus, S is empty, and we are done. 
√ √
Let Z[ −2] be the smallest ring containing both Z and −2.
√ √
Lemma 3.14. Z[ −2] = {a + b −2 | a, b ∈ Z}
√ √ √
Proof. Let S = {a + b −2 | a, b ∈ Z}. We have Z ⊂ C √ and −2 ∈ C. Thus, Z[ −2] ⊂ C.
Let T be an arbitrary subring of C that contains Z and −2. Clearly, Z ⊂ T . Furthermore,
since T√is a ring, it is closed under multiplication, so it contains all complex numbers of the
form a −2, where√ a ∈ Z. T is closed under addition, so it contains all complex numbers of
the form a + b −2, where a, b ∈ Z. Thus, S ⊂ T .
We will now show that S is a ring. We must show the following:
(1) For any z ∈ S, z · 1 = z
(2) For any z ∈ S, z + 0 = z
(3) For any x, y, z ∈ S, (x + y) + z = x + (y + z) and (xy)z = x(yz)
(4) For any x, y ∈ S, x + y = y + x
(5) For any x, y, z ∈ S, x(y + z) = xy + xz
(6) For any z ∈ S, ∃y ∈ S such that z + y = 0
(7) S is closed under addition
(8) S is closed under multiplication
Note that properties √ that S ⊂ C. For property
√ (1) through (5) follow directly from the fact
(6), let z = a + b −2, with a, b ∈ Z. Consider y = −a − b −2. We have −a ∈ Z and
12
BCA 1 PROBLEM 3 BCA 1

−b ∈ Z, so y ∈ S. Note that:
√ √
z + y = (a + b −2) + (−a − b −2)

= (a + (−a) + (b + (−b)) −2

= 0 + 0 −2
=0
Thus, property (6) holds. Furthermore, √ we can check√ that properties (7) √ and (8) hold.
Suppose
√ a, b, c, d ∈
√ Z. We have (a + b −2) + (c +
√ d −2) = (a + c) + (b + d) −2 ∈ S and
(a + b −2)(c + d −2) = (ac − 2bd) + (ad + bc) −2 ∈ S. √
We now know that√S is a ring and that for all rings T ⊂ C that contain Z and −2,
S ⊂ T . Thus, S = Z[ −2]. 
Definition 3.15. The norm of α, written as N (α), is defined as follows:
N : C → R+ ∪ {0}
a + bi 7→ a2 + b2 .
Lemma 3.16. For all x, y ∈ C, N (x)N (y) = N (xy).
Proof. Let x = a+bi and y = c+di, for some a, b, c, d ∈ R. We have xy = (ac−bd)+(ad+bc)i.
We have:
N (x)N (y) = (a2 + b2 )(c2 + d2 )
= a2 c2 + a2 d2 + b2 c2 + b2 d2
= (ac − bd)2 + (ad + bc)2
= N (xy)

√ √
Lemma 3.17. If x ∈ Z[ −2] is such that x = a + b −2 for some integers a and b, then
N (x) = a2 + 2b2 .
√ √ √ √
Proof. We have a+b −2 = a+(b 2)i, so N (x) = N (a+(b 2)i) = a2 +(b 2)2 = a2 +2b2 

Lemma 3.18. N (x) is a Euclidean function for Z[ −2].

Proof. We have N (x) ≥ 1 for all√x ∈ Z[ −2] − {0}. Thus, we have N (ab) = N (a)N (b) ≥
N (a) · 1 = N (a), for all a, b ∈ Z[ −2], none of√them equal to 0. √
We must now show that for all a, b ∈ Z[ −2], there exist q, r ∈ Z[ −2] such that
a = bq + r and N (r) < N (b). We have r = a − bq = b ab − q . Thus, since the  norm is
√ a
multiplicative, we must show that there exists q in Z[ −2] such that N b − q < 1. Let
a

= x + y −2, for some x, y ∈ R. Let j = [x] if {x} ≤ 1/2 or [x] + 1 if {x} > 1/2
b √
and k = [x] if {y} ≤ 1/2 or [y] + 1 if {y} > 1/2. If we choose q = j + k −2, we have
2 2 √
N ab − q = (x − j)2 + 2(y − k)2 ≤ 12 + 2( 12 ) = 43 < 1. Thus, we can choose q = j + k −2

and r = a − bq to complete our proof. 
  2
p −1
Lemma 3.19. p2 = (−1) 8 , where ( ap ) is the Legendre symbol.
13
PUMAC POWER ROUND PROBLEM 3 BCA 1

Proof. Let p be a rational prime. Let Z/pZ be the set of roots of polynomials in Z/pZ[x].
Let z ∈ Z/pZ be such that z 4 = −1. Let x = z + z −1 . We have −1 = z 4 = z 2 z 2 and
1 = z 2 z −2 , so z 2 = −z −2 . We have x2 = (z + z −1 )2 = z 2 + z −2 + 2 = 2. We wish to calculate
2
p
. We have:
 
2 p−1
=2 2
p
= xp−1
xp
=
x
z p + z −p
=
z + z −1
 
z p +z −p
We want to find when this value is equal to one. If p2 = 1, then z+z −1
= 1 ⇒ z p + z −p =
z + z −1 . Multiplying both sides by z p gives z 2p + 1 = z p+1 + z p−1 ⇒ (z − 1)(z p−1 − 1) = 0.
p+1

This means that either z p+1 = 1 or z p−1 = 1. We have that the order of z is 8, due to the
definition of z as a root of x4 + 1. Thus, our condition is equivalent to 8 | p + 1 or 8 | p − 1,
which is equivalent to the statement of the lemma. 

Lemma 3.20. All rational primes of the form 8k + 5 or 8k + 7 are irreducible in Z[ −2].

Proof. We can check by examining squares in modulo 8 that no integers of the form 8k + 5
or 8k + 7 can be written as x2 + 2y 2 , x, y ∈ Z. Suppose p is a prime√ of the form 8k + 5 or
8k + 7. Suppose, by contradiction,
√ that p is not irreducible in Z[ −2]. This means that
p = ab, for some a, b ∈ Z[ −2], a and b non-units. Since a and b are non-units, by Lemma
3.11, N (a) < N (p) = p2 and N (b) < N (p) = p2 . We have N (a)N (b) = N (p) = p2 . Since
p is prime (and thus irreducible) in Z, and N (a), N (b) ∈ N, we have either one of N (a) or
N (b) is one and the other is p2 or N (a) = N (b) = p. However, we know that N (a) < p2 and
N (b) < p2 . Thus, N (a) = N (b) = p. However, N (a) = p is of the form x2 + 2y 2 for some
integers x and y,√contradicting the fact that p is of the form 8k + 5 or 8k + 7. Thus, p is
irreducible in Z[ −2]. 

Lemma√ 3.21. If π ∈ Z[ −2] is such that N (π) is an irreducible of Z, then π is irreducible
in Z[ −2].

Proof. Suppose π is an element √ of Z[ −2] such that N (π) is irreducible in Z. We wish to
prove that π is irreducible
√ in Z[ −2]. It is necessary and sufficient to show
√ that if π = ab
for some a, b ∈ Z[ −2], then one of a or b is a unit. Suppose a, b ∈ Z[ −2] are such that
π = ab. We have N (a)N (b) = N (ab) = N (π). However, we have that N (π) is irreducible
in Z, so either N (a) or N (b) is a unit. Suppose, without loss of generality, that N (a) is a
unit of Z. We know that N (a) ∈ N ∪ {0}. However, √ the only unit in N ∪ {0} is 1. Thus,
N (a) = 1 ⇒ a is a unit. Thus, π is irreducible in Z[ −2]. 

Lemma√ 3.22. If p is a rational prime of the form 8k + 1 or 8k + 3, then p is not irreducible


in Z[ −2].
14
BCA 1 PROBLEM 3 BCA 1

Proof. We have:
    
−2 2 −1
=
p p p
p−1 p2 −1
= (−1) 2 (−1) 8

2
p−1
+ p 8−1
= (−1) 2

1,p≡1(
mod 8 ) or p≡3 (mod 8)
={ .
−1,p≡5( mod 8 ) or p≡7 (mod 8)

Thus, if p is a rational prime of the form 8k+1 or 8k+3, then −2is aquadratic residue mod p.
Let p be a rational prime of the form 8k + 1 or 8k + 3. We have −2 p
= 1. Thus, there exists
2 2 2
√ √
an integer k such√ that k ≡ √ −2 (mod p) ⇒ p | k +2. We have k +2 = (k + −2)(k − −2).
√ p | (k + −2)(k − −2). We wish to show that p is not irreducible. We showed that
Thus,
Z[ −2] is a Euclidean domain, and we showed that in all Euclidean
√ domains, all irreducibles
are prime. Thus, it suffices
√ to show that p is not prime in √ Z[ −2]. √Suppose, by contradiction,

that p is
√ prime in Z[ −2]. By definition, p | (k + −2)(k − −2) ⇒ p | k + −2 or
p | k − −2. However, in both cases, p must divide either √ 1 or −1, contradicting the fact
that primes are not units. Thus, p is not irreducible in Z[ −2], and thus not irreducible. 
Lemma 3.23. If x and y can both be represented as a2 + 2b2 , for some integers a and b,
then xy can be written of this form.
Proof. Suppose x = a2 + 2b2 and y = c2 + 2d2 for some a, b, c, d ∈ Z. We have:
xy = (a2 + 2b2 )(c2 + 2d2 )
= a2 b2 + 2a2 d2 + 2b2 c2 + 4b2 d2
= (ab − 4bd)2 + 2(ad + bc)2 ,
Which is of the desired form. 
Lemma 3.24. If p is a rational prime of the form 8k + 1 or 8k + 3, then p = x2 + 2y 2 for
some x, y ∈ Z.
Proof.√ Suppose p is a prime of the form 8k + √
1 or 8k + 3. By Lemma 3.22, p is not irreducible
in Z[ −2]. Therefore, p = ab, with a, b ∈ Z[ −2] and a and b are both non-units. We have
N (a)N (b) = N (ab) = N (p) = p2 . Since N (a), N (b) ∈ N, we have that either one of N (a)
or N (b) equals one and the other equals p2 or N (a) = N (b) = p. By Proposition 1.1.11,
N (a) < N (p) = p2 and N (b < N (p) = p2 . Thus, N (a) = N (b) = p. However, we have
N (a) = p is of the form x2 + 2y 2 , where x and y are integers. Thus, we have shown that p
is of the desired form. 
Lemma 3.25. If n ∈ Z is of the form x2 + 2y 2 for some integers x and y, then for all
rational primes p of the form 8k + 5 or 8k + 7, pr || n ⇒ 2 | r.
Proof. Let n be the sum of two integer squares. We wish to show that each prime of the
form 8k + 5 or 8k + 7 has even multiplicity in the prime factorization
√ of n.
√ Let n = a2 + 2b2 ,
for some integers a and b. We have n = a2 + b2 = (a + b −2)(a − b −2). Let p be a
prime of the form
√ 8k + 5 or 8k + 7 that divides n. We√showed in the preliminaries
√ that p
is prime in Z[ −2]. This means that p | n ⇒ p | a + b −2 or p | a − b −2. However, we
15
PUMAC POWER ROUND PROBLEM 3 BCA 1
√ √
have that p is a rational
√ integer. That means that
√ if p divides a + b −2 in Z[ −2],√p | a
and p | b ⇒ p | √ a − b −2. √Similarly, p | a − b −2 ⇒ p | a and p | b ⇒ p | a + b −2.
Thus, p2 | (a + b −2)(a − b −2) = n. We have now shown that n or p2 | n. For
 either√p -  √ 
higher multiplicities of p, we can divide n by p2 to obtain n = p2 ap + pb −2 ap − pb −2 .

a b
√  a b√ 
We can use the same argument with p + p −2 p − p −2 to show that either p -

a b
√  a b√  2

a b
√  a b√ 
p
+ p
−2 − −2 or p | + −2 p − p −2 . We can continue this pro-
p p √   p

p

cess until p - par + pbr −2 par − pbr −2 . Thus, p has even multiplicity in the prime
factorization of n. 
Proposition 3.1. A positive integer n can be written as x2 + 2y 2 for some integers x and y
if and only if all primes of the form 8k + 5 and 8k + 7 have even multiplicity in the prime
factorization of n.
Proof. By Lemma 3.25, n is of the form x2 + 2y 2 only if all primes of the form 8k + 5 and
8k +7 have even multiplicity in the prime factorization of n. Thus, we only need to show that
if all primes of the form 8k + 5 and 8k + 7 have even multiplicity in the prime factorization
of n and n is a positive integer, then n is of the form x2 + 2y 2 . This follows easily from the
previous propositions of this section. We know that 2 is of this form, because 2 = 02 + 2(12 ).
Furthermore, for any prime p of the form 8k + 5 or 8k + 7, p2 = p2 + 2(02 ) is of the desired
form. Finally, by Lemma 3.24, all primes of the form 8k + 1 and 8k + 3 are of the desired
form. Thus, by Lemma 3.23, any product of any integer of these forms is the sum of two
integer squares. This covers all of our desired integers, and we are done. 
 
Lemma 3.26. For an odd prime p > 3, −3 p
= 1 if and only if p ≡ 1 (mod 3).
    
−3 −1
Proof. Note that p = p3 p
as the Legendre symbol is multiplicative. If p ≡ 1
     
(mod 4), then −1 p
= 1 from Proposition 2.3, hence −3
p
= p3 . By the Law of Quadratic
 
Reciprocity, we have (as p ≡ 1 (mod 4)) p3 = p3 =⇒ p ≡ 1 (mod 3). Otherwise, if

   
−3
p ≡ 3 (mod 4), then p = − p3 . By the Law of Quadratic Reciprocity, we have (as
 
p ≡ 3 (mod 4)) p3 = − p3 , hence again p ≡ 1 (mod 3), as desired.



Lemma 3.27. If a prime p can be expressed in the form x2 + 3y 2 , then p ≡ 1 (mod 3).
Proof. Suppose x2 + 3y 2 = p for some x, y. Note that p is prime, hence x, y 6= 0. Then
x2 ≡ −3y 2 (mod p)

=⇒ (xy −1 )2 ≡ −3 (mod p)
−1
  y is the multiplicative inverse of y modulo p (which exists as y 6= 0). Hence
where
−3
p
= 1, implying that p ≡ 1 (mod 3) by the above lemma. 

Lemma 3.28. If m and n can both be expressed in the form a2 + 3b2 , then mn can also be
expressed in this form.
16
BCA 1 PROBLEM 3 BCA 1

Proof. Suppose m = a2 + 3b2 and n = c2 + 3d2 . Then


mn = (a2 + 3b2 )(c2 + 3d2 )
= a2 c2 + 3b2 c2 + 3a2 d2 + 9b2 d2
= (ac − 3bd)2 + 3(bc + ad)2
hence mn can be written in the form a2 + 3b2 , as desired. 
Lemma 3.29. If n can be expressed in the form a2 + 3b2 and p | n can also be expressed in
this form, then np can also be expressed in the form a2 + 3b2 .
Proof. Let p = a2 + 3b2 and n = c2 + 3d2 . Note that
c2 + 3d2 ≡ 0 (mod p)
2 2 2
=⇒ b (c + 3d ) ≡ 0 (mod p)
=⇒ b2 c2 − a2 d2 ≡ 0 (mod p)
=⇒ (bc − ad)(bc + ad) ≡ 0 (mod p)
bc+ad
WLOG assume that bc + ad ≡ 0 (mod p) (else replace a with −a). Hence p
is an integer.
Since ac−3bd
p
is rational and
 2  2
ac − 3bd bc + ad N
+3 = ∈Z
p p p
ac−3bd N
we have that p
is also an integer. Hence p
is expressible in the form a2 + 3b2 as
desired. 
Lemma 3.30 (Minkowski). Let L be a lattice whose fundamental domain has area V . Then
any convex region R that is symmetric about the origin and has area greater than 4V contains
a nonzero point in L.
Proof. Let L have unit vectors v1 and v2 , so L = {av1 + bv2 |a, b ∈ Z}. Consider the
lattice L0 defined by the unit vectors 2v1 and 2v2 , i.e. L0 = {2av1 + 2bv2 |a, b ∈ Z}. Note
that any lattice L∗ = {av1 + bv2 |a, b ∈ Z} partitions the space into ”parallelograms,” each
with vertices of the form av1 + bv2 , (a + 1)v1 + bv2 , av1 + (b + 1)v2 , (a + 1)v1 + (b + 1)v2 .
For the lattice L0 , let the parallelogram with vertices 0, 2v1 , 2v2 , 2v1 + 2v2 be the unit
paralleolgram. Translate all the other parallelograms of the space as partitioned by L0 to the
unit parallelogram. Note that this translation is defined to translate points in R within the
space accordingly to the parallelogram a given point lies in. As translations preserve area,
and since the unit parallelogram has area 4V and the area of R is greater than 4V , there
exists two distnict points X, Y ∈ R that were translated to the same point within the unit
parallelogram by the pigeonhole principle.
Say these two points X, Y ∈ R were both translated to a point P in the unit parallogram
of L0 . Then x − p = 2ax v1 + 2bx v2 and y − p = 2ay v1 + 2by v2 for some ax , bx , ay , by ∈ Z.
Here, points X, Y, and P are associated with vectors x, y, and p, respectively. Rearranging
and substituting, it’s clear x − y = 2(ax − ay )v1 + 2(bx − by )v2 .
Now, note that R is symmetric about the origin; thus, Y ∈ R =⇒ −Y ∈ R, where −Y
is the point associated with the vector −y. So we have X, −Y ∈ R and R is convex, so the
midpoint of the line segment connecting X and −Y is contained in R, say M ∈ R. But M is
associated with the vector x−y2
, which is equal to (ax − ay )v1 + (bx − by )v2 as per our earlier
17
PUMAC POWER ROUND PROBLEM 3 BCA 1

formula. This final expression is of the form a0 v1 + b0 v2 , for a0 , b0 ∈ Z and thus M ∈ R is


in L. Finally, note that M is nonzero because if M were zero, then ax = ay and bx = by ,
implying that X = Y , contradicting their established distinctness. Thus, M is our desired
point of R that is also a nonzero point in L.

Lemma 3.31. For all primes p ≡ 1 (mod 3), there exist x, y such that p = x2 + 3y 2 .
Proof. Since p ≡ 1 (mod 3), there exists a t such that t2 ≡ −3 (mod p) by lemma 3.26.
Consider the lattice
L = {(a, b) | a ≡ tb (mod p)}
which is equivalent to the lattice formed by the vectors (p, 0) and (1, t). Note that the area
of the √fundamental domain of this lattice is p. Consider the ellipse√x2 +√ 3y 2 = k, where
k = 4pπ 3 +  for some 0 <  < 10−9 . Since the area of this ellipse is k · √k3 · π = √

3
> 4p,
by Minkowski there exists a point of L, (a, b), inside the ellipse. Hence
a2 + 3b2 = (tb)2 + 3b2 = t2 b2 + 3b2 ≡ 0 (mod p)
and a2 + 3b2 < k < 3p. Hence a2 + 3b2 = p, 2p. But, as p ≡ 1 (mod 3), we cannot have
a2 + 3b2 = 2p =⇒ a2 ≡ 2 (mod 3), hence a2 + 3b2 = p as desired. 
Proposition 3.2. An integer n can be expressed in the form x2 + 3y 2 if and only if, for any
prime p | n such that p ≡ 2 (mod 3), vp (n) is even.
Proof. We first show that the condition is sufficient. Write
2ek+1 2ek+2
n = 3e0 pe11 pe22 . . . pekk q1 q2 . . . qk2e2k
where p1 , p2 , . . . , pk ≡ 1 (mod 3) and q1 , q2 , . . . , qk ≡ 2 (mod 3). By lemma 3.31, each of the
pk can be expressed in the form x2 + 3y 2 . Furthermore, as 3 = 02 + 3(1)2 , 3 can also be
expressed in this form. Hence, by repeated application of lemma 3.28, there exist a, b such
that
a2 + 3b2 = 3e0 pe11 pe22 . . . pekk
Furthermore, since
e e 2ek+1 2ek+2
(q1k+1 q2k+2 . . . qk2e2k )2 + 3(0)2 = q1 q2 . . . qk2e2k
by lemma 3.28 we can find c, d such that c2 + 3d2 = n as desired.
We now show that the condition is necessary. Suppose there exist a, b such that a2 + 3b2 =
n, and there exists a prime factor q ≡ 2 (mod 3) of n. Then a2 ≡ −3b2 (mod q). If
b 6≡ 0 (mod q), then there exists a multiplicative inverse b−1 of b modulo q, implying that
(ab−1 )2 ≡ −3 (mod q). But this implies that −3 is a quadratic residue modulo q ≡ 2
(mod 3), a contradiction by lemma 3.26. Hence b ≡ 0 (mod q). This implies that q | a2 =⇒
q | a, so q | a and q | b. Thus q 2 | a2 + 3b2 = n, hence there exist a1 = aq , b1 = qb such that
a21 + 3b21 = qn2 . If vq (n) were odd, we can repeat this process until we get x2 + 3y 2 = m, where
q | m and q - m2 . But then, by the same logic, we have q | x, q | y =⇒ q 2 | x2 + 3y 2 = m,
contradiction. Therefore vq (n) is even, as desired. 

18
BCA 1 PROBLEM 4 BCA 1

4. Problem 4
Definition 4.1. A binary conic polynomial F (x, y) = f (ax + by, cx + dy) is equivalent to f
if and only if |ad − bc| = 1.
Proposition 4.1. Equivalence defines an equivalence relation over binary conic polynomials.
In other words, equivalence satisfies reflexivity, symmetry, and transitivity.
Proof. We first show that f is equivalent to itself, thus establishing reflexivity. Note that
F (x, y) = f (1x + 0y, 0x + 1y) = f (x, y) is equivalent to f as 1 · 1 − 0 · 0 = 1, hence f is
equivalent to itself.
We now establish symmetry. Suppose F is equivalent to f , hence F (x, y) = f (ax+by, cx+
dy) for some integers a, b, c, d with ad − bc = ±1. It suffices to find integers p, q, r, s such that
f (x, y) = F (px+qy, rx+sy) and ps−qr = ±1, which will establish that f is equivalent to F .
We solve ax + by = X, cx + dy = Y , and we get y(bc − ad) = cX − aY , x(bc − ad) = bY − dX.
So if bc − ad = 1 we have that f (X, Y ) = F (bY − dX, cX − aY ) and if bc − ad = −1 we
have f (X, Y ) = F (dX − bY, aY − cX). Of course (ad − bc)2 = 1 ensures we have similar
properties for (−dX + bY, cX − aY ) and (dX − bY, −cX + aY ).
Finally, we establish transivity. Suppose A(x, y) = B(ax + by, cx + dy) and B(x, y) =
C(ex+f y, gx+hy) (i.e. A is equivalent to B and B is equivalent to C) for some a, b, c, d, e, f, g, h
satisfying ad − bc = ±1 and eh − f g = ±1. Then
A(x, y) = B(ax + by, cx + dy) = C(e(ax + by) + f (cx + dy), g(ax + by) + h(cx + dy))
=⇒ A(x, y) = C(x(ae + cf ) + y(be + df ), x(ag + ch) + y(bg + dh))
it suffices to show that
(ae + cf )(bg + dh) − (be + df )(ag + ch) = ±1
but
(ae + cf )(bg + dh) − (be + df )(ag + ch)
= aebg + aedh + cf bg + cf dh − beag − bech − df ag − df ch
= aedh + cf bg − bech − df ag
= (ad − bc)(eh − f g)
Since ad − bc = ±1 and eh − f g = ±1, we have (ad − bc)(eh − f g) = ±1 as desired. Hence
equivalence satisfies transivity, symmetry, and reflexivity, and is therefore an equivalence
relation as desired. 
Proposition 4.2. Two binary conic polynomials are equivalent only if they represent the
same set of integers.
Proof. Suppose two binary conic polynomials A and B are equivalent. Then there exist
a, b, c, d such that B(x, y) = A(ax + by, cx + dy) and ad − bc = ±1. If B can represent z,
then there exist x0 , y0 such that B(x0 , y0 ) = z, then A(ax0 + by0 , cx0 + dy0 ) = z, so A can
also represent z. Hence any integer representable by B is also representable by A. Similarly,
any integer representable by A is also representable by B, hence any two equivalent binary
conic polynomials represent the same set of integers. 

19
PUMAC POWER ROUND PROBLEM 5 BCA 1

5. Problem 5
Proposition 5.1. A binary conic polynomial f (x, y) = ax2 + bxy + cy 2 with discriminant
D(f ) = b2 − 4ac is positive-definite if and only if a > 0 and D(f ) < 0.
Proof. Suppose there exist some x1 , y1 , where x1 and y1 are not both zero, such that
f (x1 , y1 ) ≤ 0. If y1 = 0, then ax21 ≤ 0 =⇒ x1 = 0, contradiction. Hence y1 is nonzero.
ax2 +bx y +cy 2
Denote r = xy11 . Then 1 y12 1 1 = ar2 +br +c ≤ 0, but ar2 +br +c has no real roots by the
1
quadratic formula. Furthermore, since a > 0, ar2 + br + c is always positive, contradiction.
Therefore no such x1 , y1 exist, implying that f is positive-definite.
We now establish the converse. Suppose that f is positive-definite. Since ax2 +bxy +cy 2 >
0 for any x, y (not both zero), f (1, 0) > 0 =⇒ a > 0. Similarly, f (0, 1) > 0 =⇒ c > 0. For
any (x, y) = (p, q), where q 6= 0, we have f (p, q) = ap2 + bpq + cq 2 > 0. Denote r = pq to get
f (p,q)
q2
= ar2 + br + c > 0. Let g(x) = ax2 + bx + c, so that g(r) > 0 for all rational r. Suppose
g has two distinct irrational roots α1 and α2 . Because the rationals are dense, there exists
some rational r satisfying α1 < r < α2 , but g(r) > 0 for all rational r, contradicting the fact
that g(r) is quadratic with a > 0. Hence g(x) has either no real roots or a single irrational
b b
double root. If g has a double root, then b2 = 4ac =⇒ g(− 2a ) = 0, contradiction as − 2a is
rational. Hence g has no real roots, implying that b2 − 4ac = D(f ) < 0 as desired. 
Proposition 5.2. If f (x, y) represents a prime p, then D(f ) is a quadratic residue modulo
p.
Proof. Suppose that f (x, y) = p for some x, y. We work over the field Fp (mod p). If a = 0
or c = 0, then D(f ) = b2 − 4ac = b2 , and we are finished. Thus assume that a, c 6= 0.
Furthermore, if y ≡ 0 (mod p), then p | ax2 implying that either x ≡ 0 (mod p) =⇒
f (x, y) ≡ 0 (mod p2 ), contradiction, or a ≡ 0 (mod p), also a contradiction. Hence x, y 6≡ 0
(mod p).
Denote r = xy , where xy = xy −1 is in modulo p. We thus have that ar2 + br + c = 0 =⇒
r2 + bra + ac = 0. Now
b 2 br b2 b2 c b2 − 4ac
(r + ) = r2 + + 2 = 2− =
2a a 4a 4a a 4a2
2−4ac
therefore b 4a2 is a quadratic residue modulo p. But 4a2 = (2a)2 is also a quadratic residue
2 −4ac
modulo p, hence b2 − 4ac = b 4a 2 · 4a2 is also a quadratic residue modulo p, as desired. 
Lemma 5.1. Let A be a 2x2 matrix and B be a 2x1 matrix. Then
(AB)T = B T AT
where X T denotes the transpose of X.
Proof. Let A be
 
a b
c d
and B be  
x
y
20
BCA 1 PROBLEM 5 BCA 1

Then AB is  
ax + by
cx + dy
and B T AT =  
a c 
x y
b d

= ax + by cx + dy
= (AB)T
as desired.
Remark: This relation holds for any matrices A,B 
Lemma 5.2. Let A, B both be 2x2 matrices. Then
det(AB) = det(A)det(B)
where det(X) denotes the determinant of X.
Proof. Let    
a b e f
A= ,B =
c d g h
then  
ae + bg af + bh
AB =
ce + dg cf + dh
hence
det(AB) = (ae + bg)(cf + dh) − (af + bh)(ce + dg)
= aecf + aedh + bgcf + bgdh − af ce − af dg − bhce − bhdg
= aedh + bgcf − af dg − bhce
= (ad − bc)(eh − f g)
= det(A)det(B)
as desired.
Remark: This relation holds for any square matrices A,B of the same size 
Lemma 5.3. Denote  
x
X=
y
then the conic polynomials F and f are equivalent only if there exists a 2x2 matrix M with
determinant ±1 such that
F (X) = f (M X).
Proof. By the definition of equivalence, there exist a, b, c, d satisfying ad − bc = ±1 such that
F (x, y) = f (ax + by, cx + dy).
Hence, taking  
a b
M=
c d
gives F (X) = f (M X) and det(M ) = ad − bc = ±1 as desired. 
21
PUMAC POWER ROUND PROBLEM 5 BCA 1

Lemma 5.4. Let f be a binary conic polynomial with associated matrix A. Then
disc(f ) = −4det(A)
where disc(f ) denotes the discriminant of f .
Proof. Suppose f = ax2 + bxy + cy 2 , so that
b
 
a 2
A= b .
2
c
Then
b2
 
2
disc(f ) = b − 4ac = −4 ac − = −4det(A)
4
as desired. 
Proposition 5.3. Two equivalent conic polynomials have the same discriminant.
Proof. Denote the polynomials F and
f = X T AX
where X is defined as above and A is the matrix associated with f . By Lemma 5.3, there
exists a matrix M with determinant ±1 such that
F (X) = f (M X) = (M X)T AM X
=⇒ F (X) = X T M T AM X
where we utilized Lemma 5.1 to establish (M X)T = X T M T . Hence the matrix associated
to F (X) is M T AM . By lemma 5.4, we have disc(F ) = −4det(M T AM ), and by lemma 5.2
we have
disc(F ) = −4det(M T AM )
= −4det(M T )det(A)det(M )
but as det(M T ) = det(M ) = ±1, we have
det(M T )det(M ) = 1
=⇒ disc(F ) = −4det(A) = disc(f )
as desired. 

22
BCA 1 PROBLEM 6 BCA 1

6. Problem 6
Lemma 6.1. Modulo an odd prime p, ab is a quadratic residue if and only if a, b are either
both residues or both nonresidues.
          
Proof. By multiplicity, abp
= a
p
b
p
. Hence ab
p
= 1 if and only if a
p
= b
p
, as
desired. 
Lemma 6.2 (Minkowski). Let L be a lattice whose fundamental domain has area V . Then
any convex region R that is symmetric about the origin and has area greater than 4V contains
a nonzero point in L.
Proof. Let L have unit vectors v1 and v2 , so L = {av1 + bv2 |a, b ∈ Z}. Consider the
lattice L0 defined by the unit vectors 2v1 and 2v2 , i.e. L0 = {2av1 + 2bv2 |a, b ∈ Z}. Note
that any lattice L∗ = {av1 + bv2 |a, b ∈ Z} partitions the space into ”parallelograms,” each
with vertices of the form av1 + bv2 , (a + 1)v1 + bv2 , av1 + (b + 1)v2 , (a + 1)v1 + (b + 1)v2 .
For the lattice L0 , let the parallelogram with vertices 0, 2v1 , 2v2 , 2v1 + 2v2 be the unit
paralleolgram. Translate all the other parallelograms of the space as partitioned by L0 to the
unit parallelogram. Note that this translation is defined to translate points in R within the
space accordingly to the parallelogram a given point lies in. As translations preserve area,
and since the unit parallelogram has area 4V and the area of R is greater than 4V , there
exists two distnict points X, Y ∈ R that were translated to the same point within the unit
parallelogram by the pigeonhole principle.
Say these two points X, Y ∈ R were both translated to a point P in the unit parallogram
of L0 . Then x − p = 2ax v1 + 2bx v2 and y − p = 2ay v1 + 2by v2 for some ax , bx , ay , by ∈ Z.
Here, points X, Y, and P are associated with vectors x, y, and p, respectively. Rearranging
and substituting, it’s clear x − y = 2(ax − ay )v1 + 2(bx − by )v2 .
Now, note that R is symmetric about the origin; thus, Y ∈ R =⇒ −Y ∈ R, where −Y
is the point associated with the vector −y. So we have X, −Y ∈ R and R is convex, so the
midpoint of the line segment connecting X and −Y is contained in R, say M ∈ R. But M is
associated with the vector x−y2
, which is equal to (ax − ay )v1 + (bx − by )v2 as per our earlier
formula. This final expression is of the form a0 v1 + b0 v2 , for a0 , b0 ∈ Z and thus M ∈ R is
in L. Finally, note that M is nonzero because if M were zero, then ax = ay and bx = by ,
implying that X = Y , contradicting their established distinctness. Thus, M is our desired
point of R that is also a nonzero point in L.

Proposition 6.1. For all primes p,
 
−5
= 1 ⇐⇒ p ≡ 1, 3, 7, 9 (mod 20)
p
Proof. Note: we assume
  that the special cases of p = 2 and p = 5 are to be discarded.
By Lemma 6.1, −5 p
= 1 if and only if 5 and -1 are either both residues or both nonresidues
modulo p.
Case 1: 5 and -1 are both residues modulo p.
In this case, since -1 is a residue modulo p, problems 2.2 and 2.3 tell us that p ≡ 1 (mod 4).
Furthermore, by quadratic reciprocity, −5 is a residue modulo p if and only if p is a residue
modulo 5 (since 5 ≡ 1 (mod 4)), hence p ≡ 1, 4 (mod 5). Therefore p ≡ 1, 9 (mod 20).
Case 2: 5 and -1 are both nonresidues modulo p.
23
PUMAC POWER ROUND PROBLEM 6 BCA 1

In this case, since -1 is a nonresidue modulo p, problems 2.2 and 2.3 tell us that p ≡ 3
(mod 4). Furthermore, by quadratic reciprocity p is a nonresidue modulo 5, hence p ≡ 2, 3
(mod 5). Therefore p ≡ 3, 7 (mod 20).
Combining the two cases, −5 is a quadratic residue modulo p if and only if p ≡ 1, 3, 7, 9
(mod 20), as desired.
It does not, however, show that every such prime may be written in the form x2 + 5y 2 .
Suppose x2 + 5y 2 = p ≡ 3 (mod 20), hence x2 + 5y 2 = 20k + 3 for some integer k. Then
x2 ≡ 3 (mod 5), a contradiction as 3 is a nonresidue modulo 5. 
 
Proposition 6.2. If −5 p
= 1 for an odd prime p, then either p or 2p can be represented
by x2 + 5y 2 .
 
Proof. Since −5 p
= 1, there exists a t such that t2 ≡ −5 (mod p). Consider the lattice
L = {(a, b)|a ≡ tb (mod p)}, which is equivalent to the lattice generated by the vectors
(p, 0) and (t, 1). The area of the fundamental

domain of this lattice has area p. Consider
4p 5
the ellipse x + 5y = k, where k = π +  for some 0 <  < 10−9 . Then the area of this
2 2
√ q
ellipse is π · k · k5 = √ kπ
5
> 4p, so by Lemma 6.2 there exists a point of L, (a, b), that lies
inside the ellipse.
Hence a2 + 5b2 = (tb)2 + 5b2 = t2 b2 + 5b2 ≡ 0 (mod p), and a2 + 5b2 < k < 3p as (a, b) lies
inside the ellipse. Hence a2 + 5b2 = p or 2p, as desired. 
 
Proposition 6.3. For an odd prime p such that −23 p
= 1, either p or 3p can be represented
by the form x2 + 23y 2 .
 
Proof. Since −23 p
= 1, there exists a t such that t2 ≡ −23 (mod p). Consider the lattice
L = {(a, b)|a ≡ tb (mod p)}, which is equivalent to the lattice generated by the vectors
(p, 0) and (t, 1). The area of the fundamental

domain of this lattice has area p. Consider
4p 23
the ellipse x + 23y = k, where k = π +  for some 0 <  < 10−9 . Then the area of this
2 2
√ qk
ellipse is π · k · 23 = √kπ23 > 4p, so by Lemma 6.2 there exists a point of L, (a, b), that lies
inside the ellipse.
Hence a2 + 23b2 = (tb)2 + 23b2 = t2 b2 + 23b2 ≡ 0 (mod p), and a2 + 23b2 < k < 7p as (a, b)
lies inside the ellipse. Hence a2 + 23b2 = p, 2p, 3p, 4p, 5p, or 6p. However, a2 + 23b2 ≡ 0, 1, 3
(mod 4), so a2 + 23b2 6= 2p, 6p. Furthermore, , if a2 + 23b2 = 5p then a2 + 23b2 ≡ 0 (mod 5),
−23

possible only when a ≡ b ≡ 0 (mod 5). Then p ≡ 0 (mod 5) =⇒ p = 5, but 5 = −1,
contradiction. Finally, if a2 + 23b2 = 4p, then a, b are of the same parity. If both a, b are
even, then there exist a1 , b1 so that a = 2a1 , b = 2b1 =⇒ a21 + 23b21 = p, so p is of the desired
form. If both a, b are odd, then a2 ≡ b2 ≡ 1 (mod 8), hence 8 | a2 + 23b2 = 4p implying
p = 2, contradicting the oddness of p. Hence p or 3p is expressible in the form a2 + 23b2 for
all odd primes p, as desired. 
Proposition 6.4. Let p ≡ 1 (mod 4). Then p has a unique representation x2 + y 2 .
Proof. Suppose there exist a, b, c, d with a2 + b2 = c2 + d2 = p. Without loss of generality,
assume that a, c are both even and b, d are both odd, and that c > a =⇒ b > d. Let
b = d + 2x and c = a + 2y. Then
a2 + b 2 = c 2 + d 2
24
BCA 1 PROBLEM 6 BCA 1

=⇒ c2 + 4xc + 4x2 + b2 = c2 + b2 + 4yb + 4y 2


=⇒ x(x + d) = y(a + y)
Let gcd(x, y) = n and x = nx1 , y = ny1 . Then x1 (x + d) = y1 (a + y). Suppose y1 > x + d.
Then x1 > a + y =⇒ x + y ≥ x1 + y1 > x + d + a + y, contradiction. Thus y1 ≤ x + d and
so x1 ≤ a + y. As such, since gcd(x1 , y1 ) = 1, we can write x + d = ky1 =⇒ a + y = kx1
for some k ≥ 1. Then a = kx1 − y, d = ky1 − x =⇒ b = ky1 + x. Then
a2 + b2 = (kx1 − y)2 + (ky1 + x)2 = kx21 − 2kx1 y + y 2 + k 2 y12 + 2kxy1 + x2
but nx1 y = nxy1 = xy, hence
a2 + b2 = kx21 + (ny1 )2 + k 2 y12 + (nx1 )2
= (k 2 + n2 )(x1 + y12 )
but k 2 + n2 ≥ 2 and x1 + y12 ≥ 2, hence a2 + b2 is not prime contradiction. Therefore c > a
is false, and analogously a > c is also false. Hence a = c =⇒ b = d, and the representation
is unique as desired. 
Proposition 6.5. Suppose p is a prime. If there exists a representation of p in the form
3x2 + 7y 2 , then it is unique.
Proof. Suppose there exist a, b, c, d with 3a2 +7b2 = 3c2 +7d2 = p. Without loss of generality
assume that a > c =⇒ d > b. We have two cases:
Case 1: a, c are of the same parity. Then b, d are also of the same parity. Let a = c + 2x
and d = b + 2y. Then
a2 + b2 = 3(c + 2x)2 + 7b2 = 3c2 + 12cx + 12x2 + 7b2 = c2 + d2 = 3c2 + 7b2 + 28by + 28y 2
=⇒ 3x(c + x) = 7y(b + y)
Let n = gcd(x, y), and x = nx1 , y = ny1 . Then 3x1 (c + x) = 7y1 (b + y). Suppose y1 > c + x.
Then x1 > b + y =⇒ x + y ≥ x1 + y1 > x + y + b + c, contradiction. Thus y1 ≤ c + x =⇒
x1 ≤ b + y. As such, since gcd(x1 , y1 ) = 1, we can write c + x = 7ky1 =⇒ b + y = kx1 for
some k ≥ 1. Hence c = 7ky1 − x =⇒ a = 7ky1 + x and b = kx1 − y, so
3a2 + 7b2 = 3(7ky1 + nx1 )2 + 7(3kx1 − ny1 )2
= 3(49k 2 y12 + 14nkx1 y1 + n2 x21 ) + 7(9k 2 x21 − 6nkx1 y1 + n2 y12 )
= 147k 2 x21 + 3n2 x21 + 63k 2 x21 + 7n2 y12
= (3x21 + 7y12 )(21k 2 + n2 )
contradicting the primality of p.
Case 2: a, c are of different parity. Then b, d are also of different parity. Furthermore, a, b
are of different parity as otherwise exactly one of 3a2 + 7b2 , 3c2 + 7d2 would be a multiple of
4. WLOG assume that a is even, hence b, c are both odd and d is also even. Note that
3a2 + 7b2 = 3c2 + 7d2
=⇒ 3(a − c)(a + c) = 7(d − b)(d + b)
let x = a − c and y = d − b, which are both necessarily odd. Then we have
3x(x + 2c) = 7y(y + 2b)
=⇒ 3x2 + 6xc = 7y 2 + 14yb
25
PUMAC POWER ROUND PROBLEM 6 BCA 1

Since x, y are both odd, we have x2 ≡ y 2 ≡ 1 (mod 8), so


6xc ≡ 4 + 14yb (mod 8)

=⇒ 3xc ≡ 2 + 7yb (mod 4)


=⇒ 3(xc − yb) ≡ 2 (mod 4)
=⇒ xc − yb ≡ 2 (mod 4)
=⇒ (a − c)c − (d − b)b = ac − c2 − db + b2 ≡ 2 (mod 4)
but ac − bd is odd and b2 − c2 is even, contradiction.
Therefore, our original supposition of a > c must have been false, and analogously c > a
is impossible. Hence a = c =⇒ b = d, and the representation of p is unique as desired.

Proposition 6.6. For any pairwise relatively prime integers a, b, c, and an integer M , there
exist x, y such that ax2 + bxy + cy 2 is relatively prime to M .
Proof. Let p1 , p2 , . . . , pn be the primes dividing M . I claim that, for each pi , there exist xi , yi
so that f (xi , yi ) is relatively prime to pi . If pi | a, then pi - c as otherwise gcd(a, c) 6= 1,
contradiction. Hence if pi | a, then (xi , yi ) = (0, 1) suffices. Otherwise, if pi - a, then
(xi , yi ) = (1, 0) suffices.
By the Chinese Remainder Theorem, there exist X, Y such that X ≡ xi (mod pi ) and
Y ≡ yi (mod pi ) for all 1 ≤ i ≤ n. Then f (X, Y ) = aX 2 + bXY + cY 2 is relatively prime to
each prime pi , and thus is relatively prime to M . 
Proposition 6.7. Suppose n is a positive integer, a and b are coprime, and N = a2 + nb2 .
If q = x2 + ny 2 is a prime number that divides N , then N/q = c2 + nd2 for some c, d ∈ Z.
Proof. Let N, q, a, b, x, y be defined as in the proposition. Suppose q = n. Then n must
22 2
divide a. We have N/q = an b = b2 + n na . Choosing c = b and d = a/n satisfies the
proposition.
Suppose q 6= n. Clearly, q > n, and since q is prime, x and y are coprime. We have
x2 N − a2 q = x2 (a2 + nb2 ) − a2 (x2 + ny 2 )
= a2 x2 + nb2 x2 − a2 x2 − na2 y 2
= n(bx − ay)(bx + ay)
Since q > n, q and n are coprime. Thus, since q is prime, q | bx − ay or q | bx + ay. Without
loss of generality, suppose q | bx − ay. We have bx − ay = dq for some integer d. Thus,
ay = bx − dq.
We will now show that x | a + ndy. Since x and y are coprime, it suffices to show that
x | y(a + ndy). We have
y(a + ndy) = ay + ndy 2
= bx − dq + ndy 2
= bx − d(x2 + ny 2 ) + ndy 2
= bx − dx2 ,
26
BCA 1 PROBLEM 6 BCA 1

which is clearly divisible by x. Thus, a+ndy = cx for some integer c, which gives a = cx−ndy.
Plugging this into the equation bx − ay = dq, we get b = cy + dx. Thus, we have
N = a2 + nb2
= (cx − ndy)2 + n(cy + dx)2
= c2 x2 + nd2 x2 + nc2 y 2 + n2 d2 y 2
= (x2 + ny 2 )(c2 + nd2 ).
Thus, we have N/q = c2 + nd2 , finishing our proof. 
Proposition 6.8. Let A, B ⊂ N be defined as
A = {n | n < 22000 , n = 2x2 − 3y 2 for some x, y ∈ Z}
B = {n | n < 22000 , n = 10xy − x2 − y 2 for some x, y ∈ Z}
then |A| > |B|.
Proof. Note that
10xy − x2 − y 2 = 2(x + y)2 − 3(x − y)2
hence if there exists an n ∈ B =⇒ n = 2(a + b)2 − 3(a − b)2 for some a, b ∈ Z, then
x = a + b, y = a − b =⇒ n = 2x2 − 3y 2 and x, y ∈ Z, hence n ∈ A as well. Therefore
B ⊂ A. It suffices to find an n such that n ∈ A and n 6∈ B. Consider n = 5. Then
n = 5 = 2(2)2 − 3(1)2 , so n ∈ A, while
10xy − x2 − y 2 ≡ 2xy − x2 − y 2 ≡ −(x − y)2 (mod 8)
and -5 is not a quadratic residue modulo 8, hence n 6∈ B. As such, |A| > |B| as desired. 

27
PUMAC POWER ROUND PROBLEM 7 BCA 1

7. Problem 7
Let f (x, y, z, w) = x2 + y 2 + z 2 + w2 .
k
Lemma 7.1. If k is even and can be written as the sum of four squares, then 2
is also the
sum of four squares
Proof. If k = a2 + b2 + c2 + d2 and k is even, that means either none, two, or all of a, b, c, d
are even. Thus, we have that two of a, b, c, d have the same parity, and the other two also
have the same parity. Suppose, without loss of generality, that a and b have the same parity,
and c and d have the same parity. We have that a+b 2
, a−b
2
, c+d
2
, and c−d
2
are all integers.
k a+b
2 a−b
 2 c+d
 2 c−d
2 k
Furthermore, 2 = 2 + 2 + 2 + 2 . Thus, 2 is the sum of four integer
squares. 
Proposition 7.1. If integers m, n can be represented by f , then so can mn.
Proof. Let x = a2 + b2 + c2 + d2 and y = e2 + f 2 + g 2 + h2 for some a, b, c, d, e, f, g ∈ Z. Note
that
(ae + bf + cg + dh)2 + (af − be + ch − dg)2 + (ag − bh − ce + df )2 + (ah + bg − cf − de)2
= (ae)2 +(bf )2 +(cg)2 +(dh)2 +(af )2 +(be)2 +(ch)2 +(dg)2 +(ag)2 +(bh)2 +(ce)2 +(df )2 +(ah)2 +
(bg)2 +(cf )2 +(de)2 +2(abef +aceg +adeh+bcf g +bdf h+cdgh−abef +acf h−adf g −bceh+
bdeg−cdgh−abgh−aceg+adf g+bceh−bdf h−cdef +abgh−acf h−adeh−bcf g−bdeg+cdef )
= (ae)2 + (bf )2 + (cg)2 + (dh)2 + (af )2 + (be)2 + (ch)2 + (dg)2 + (ag)2 + (bh)2 + (ce)2 + (df )2 +
(ah)2 + (bg)2 + (cf )2 + (de)2
= (a2 + b2 + c2 + d2 )(e2 + f 2 + g 2 + h2 ), so the conclusion follows. 
Proposition 7.2. For all odd primes p, there exits an integer t < p such that tp can be
represented by f .
Proof. We will in fact show a stronger result: that there exists an integer t < p such that tp
can be represented by f .
Let p be an odd positive rational prime. Consider the sets S = {t2 | t ∈ Z/pZ, 0 ≤ t ≤ p−12
}
2 p−1 p+1
and T = {−1 − t | t ∈ Z/pZ, 0 ≤ t ≤ 2 }. Each of S and T have 2 elements. We see
that no two elements of S are congruent modulo p, and no two elements of T are congruent
modulo p. Thus, since S contains p+1 2
distinct elements modulo p and T contains p+12
distinct
elements modulo p, by the pigeonhole principle, there must be some element b of T such
that there exists an element t of S such that t ≡ b (mod p). Thus, we have x2 ≡ −1 − y 2
for some integers x and y between 0 and p−1 2
⇒ p | x2 + y 2 + 1. Suppose x2 + y 2 + 1 = tp
2 2
for some t ∈ Z. We have: tp = x2 + y 2 + 1 ≤ p−1 2
+ p−1
2
+ 1 < p2 ⇒ t < p. This proves
the problem statement. 
Proposition 7.3. If t0 is the smallest positive integer t such that tp can be represented by
f , then t0 is odd.
Proof. Let t0 be as defined in thestatement of the proposition. Suppose, by contradiction,
that t0 is even. By Lemma 7.1, k2 p is the sum of four squares, contradicting the minimality
of t0 . Thus, t0 is odd. 
Proposition 7.4. Suppose p is an odd prime. If t > 1, t is odd, and tp can be represented
by f , then there exists some s < t such that sp can also be represented by f .
28
BCA 1 PROBLEM 7 BCA 1

Proof. Let p be an odd prime. Suppose t > 1 is odd and tp can be represented by f . Let
tp = a2 + b2 + c2 + d2 for some a, b, c, d ∈ Z. By the division algorithm for Z, we can choose
e, f, g, h ∈ Z such that |e| ≤ t−12
, |f | ≤ t−1
2
, |g| ≤ t−1
2
, and |h| ≤ t−12
, and a ≡ e (mod t),
b ≡ f (mod t), c ≡ g (mod t), and d ≡ h (mod t).
We have e2 +f 2 +g 2 +h2 ≡ a2 +b2 +c2 +d2 ≡ 0 (mod t). Thus, e2 +f 2 +g 2 +h2 = st for some
2 t−1 2 t−1 2 t−1 2
integer s. Furthermore, we have st = e2 + f 2 + g 2 + h2 ≤ t−1
  
2
+ 2
+ 2
+ 2
<
2
t ⇒ s < t. Also notice that s > 0, or else e = f = g = h = 0. This means that a, b, c, and
d are all divisible by t, which means that p is the sum of squares, a contradiction. We now
have (st)(tp) = t2 sp = (a2 + b2 + c2 + d2 )(e2 + f 2 + g 2 + h2 ) = (ae + bf + cg + dh)2 + (af − be +
ch − dg)2 + (ag − bh − ce + df )2 + (ah + bg − cf − de)2 . By replacing a with e, b with f , c with
g, and d with h, we can see that all of ae + bf + cg + dh, af − be + ch − dg, ag − bh − ce + df ,
and ah + bg − cf − de are congruent to zero in modulo t.
Thus, we can divide the whole equation by t2 to obtain that sp is the sum of four squares.
s is a positive integer and s < t, so s satisfies the conditions of the proposition. 
Proposition 7.5. Let p be an odd prime. If t0 is the smallest positive integer t such that tp
can be represented by f , then t0 = 1.
Proof. Suppose p is an odd prime. Let t0 be the smallest positive integer t such that tp can
be represented by f . Suppose, by contradiction, that t0 > 1. By Proposition 7.3, t0 is odd.
However, by Proposition 7.4, there exists some positive integer s < t0 such that sp can be
represented by f , contradicting the minimality of t0 . Thus, t0 = 1. 
Proposition 7.6. Every positive integer can be represented by f .
Proof. By Proposition 7.1, the product of two integers expressable by f is also expressable
by f . Thus, it suffices to show that all positive rational primes can be represented by f . We
have 2 = 12 + 12 + 02 + 02 . Suppose p is a positive rational prime. We have shown that
there exists some t < p such that tp is expressable by f . Furthermore, we have shown that
the smallest t such that tp is expressable by f is 1. Therefore, p is expressable by f . Thus,
since all rational primes can be represented by f , so can all positive integers. 

29
PUMAC POWER ROUND PROBLEM 8 BCA 1

8. Problem 8
p2 −1
 
2
Lemma 8.1. p
= (−1) 8 , where ( ap ) is the Legendre symbol.

Proof. Let p be a rational prime. Let Z/pZ be the set of roots of polynomials in Z/pZ[x].
Let z ∈ Z/pZ be such that z 4 = −1. Let x = z + z −1 . We have −1 = z 4 = z 2 z 2 and
1 = z 2 z −2 , so z 2 = −z −2 . We have x2 = (z + z −1 )2 = z 2 + z −2 + 2 = 2. We wish to calculate
2
p
. We have:
 
2 p−1
=2 2
p
= xp−1
xp
=
x
z p + z −p
=
z + z −1
  p +z −p
−p
We want to find when this value is equal to one. If p2 = 1, then zz+z p
−1 = 1 ⇒ z + z =
z + z −1 . Multiplying both sides by z p gives z 2p + 1 = z p+1 + z p−1 ⇒ (z p+1 − 1)(z p−1 − 1) = 0.
This means that either z p+1 = 1 or z p−1 = 1. We have that the order of z is 8, due to the
definition of z as a root of x4 + 1. Thus, our condition is equivalent to 8 | p + 1 or 8 | p − 1,
which is equivalent to the statement of the lemma. 
Let (a, b)v be the Hilbert symbol for Qv .
Lemma 8.2. If the equation a1 x21 + a2 x22 + a3 x23 = 0 has a nontrivial solution over Qv for
all primes v and v = ∞, then it has a nontrivial solution over Q.
Proof. We can assume that one of a1 , a2 , a3 is one, and the lemma is equivalent to the
following statement: If ax2 + by 2 = z 2 has a nontrivial solution over Qv for all v, then it has
a nontrivial solution over Q. We can assume that both a and b are squarefree.
Let p be a prime dividing |b|. We know that we can find some x, y, z ∈ Qp such that
ax2 + by 2 = z 2 . We can scale this solution such that x, y, z ∈ Zp and gcd(x, y, z) = 1. Since
p | |b|, we have by 2 = 0. Thus, ax2 = y 2 (mod p). Therefore, a is a square mod p. Since this
holds for all p satisfying p | |b|, a is therefore a square mod |b|. By an identical argument, b is
a square mod |a|. Thus, by Legendre’s theorem, the equation ax2 + by 2 = z 2 has a nontrivial
rational solution. 
Lemma 8.3. If the equation ax2 + by 2 + cz 2 = 0 has a nontrivial solution over Qv for all
primes v except at most one and v = ∞, then it has a nontrivial solution over Qv for all
primes v and v = ∞.
Proof. We can scale a, b, c so that c = 1. By the hypothesis, (−a, −b)v = 1 for all v except
at most one value of v. Let this value be v0 by Hilbert’s reciprocity law, (−a, −b)v0 = 1, and
thus the equation ax2 + by 2 + cz 2 = 0 has a nontrivial solution over all p − adic fields. 
Lemma 8.4. If the equation a1 x21 + a2 x22 + a3 x23 + a4 x24 = 0 has a nontrivial solution over
Qv for all primes v and v = ∞, then it has a nontrivial solution over Q.
30
BCA 1 PROBLEM 8 BCA 1

Proof. Let f = a1 x21 + a2 x22 + a3 x23 + a4 x24 be a quadratic form that represents zero in all
p − adic fields and the reals. We will prove that f represents 0 in Q. For the purposes of this
proof, we can assume that all the ai are squarefree, a1 > 0, and a4 < 0. Let g = a1 x21 + a2 x22
and h = −a3 x23 − a4 x24 . We will show that there exists some rational number c such that c is
expressable by both g and h. Let p1 , p2 , . . . , pn be the set of odd prime divisors of x1 , x2 , x3 ,
and x4 . For each i, choose some y1 , y2 , y3 , y4 such that a1 y12 + a2 y22 + a3 y32 + a4 y42 = 0 in Qpi .
We can do the same for p = 2. Let cp = a1 y12 + a2 y22 = −a3 y32 − a4 y42 . We can choose the yi
so that p2 - cp .
Define a0 as follows:

a0 ≡ c 2 (mod 16)
a0 ≡ c p 1 (mod p21 )
a0 ≡ c p 2 (mod p22 )
..
.
a0 ≡ c p n (mod p2n ).
By the Chinese Remainder theorem, a0 is uniquely defined modulo m = 16p21 p22 · · · p2n . Let
d = gcd(m, a0 ). By Dirichlet’s theorem on arithmetic progressions, we can find some integer
k and prime q such that a0 + km = dq. We let a = a0 + km. Note that a satisfies all
of the congruences that a0 satisfies. Since p2i - cpi for all i, a−1 cpi ≡ 1 (mod pi ) for all i.
Furthermore, a−1 c2 ≡ 1 (mod 8). Therefore, for p = 2, p1 , p2 , . . . , pn , a−1 bp is a square in
Qp . It follows that for the same primes, the quadratic forms −aw2 + g and −aw2 + h both
represent zero in Qp .
Let p 6= 2, p1 , p2 , . . . , pn , q be a prime. We wish to show that −aw2 + g and −aw2 + h both
represent 0 in Qp . It suffices to show that they represent zero modulo p, which follows from
the Chevalley-Warning theorem.
Therefore, the two ternary quadratic forms −aw2 + g and −aw2 + h represent zero over Qv
for all v except possibly v = q. By Lemma 8.3, they represent zero over all Qv . By Lemma
8.2, the two quadratic forms represent zero over Q, finishing the proof. 
Let f (x, y, z) = x2 + y 2 + z 2 .
Proposition 8.1. If n = 4m (8k + 7) for some nonnegative integers m and k, then n cannot
be represented by f .
Proof. Let n = 4m (8k+7) for some nonnegative integers m and k. Suppose, by contradiction,
that n can be written as the sum of three squares. We have n = a2 + b2 + c2 for some
a, b, c ∈ Z. Suppose m > 0. Since a2 , b2 , and c2 are all equal to either 1 or 0 modulo
4, we can check that if 4 divides a2 + b2 + c2 , then 4 divides a2 , b2 , and c2 . Thus, we
2 2 2
have a2 + 2b + 2c = 4m−1 (8k + 7). We can continue this process until we obtain

2 2 2
8k + 7 = 2am + 2bm + 2cm . However, this means that 8k + 7 is the sum of three
squares, a contradiction, considering the fact that the quadratic residues modulo 8 are 0, 1,
and 4. Thus, n cannot be represented as the sum of three integer squares. 
Proposition 8.2. If the equation n = f (x, y, z) has a solution (x, y, z) ∈ Q3 , then it has a
solution (x, y, z) ∈ Z3 .
31
PUMAC POWER ROUND PROBLEM 8 BCA 1

Proof. Let n be an integer and suppose (x1 , x2 , x3 ) ∈ Q3 is a solution to n = f (x, y, z). Let
g be the least common multiple of the denominators of x1 , x2 , and x3 when written in lowest
terms. We have that the equation f (x, y, z) = g 2 n has a solution (y1 , y2 , y3 ) ∈ Z3 . Let d be
the smallest positive integer for which f (x, y, z) = d2 n has a solution (y1 , y2 , y3 ) ∈ Z3 . It
suffices to show that d = 1. Note that if yi /d ∈ Z for all i, then we are done. Thus, suppose
yi /d ∈
/ Z for some i.
Suppose d > 1. Let {x} be the fractional part of x and let [x] be the greatest integer in
x. Let mi = [yi /d] if {yi /d} ≤ 21 or [yi /d] + 1 if {yi /d} > 12 for i = 1, 2, 3. For i = 1, 2, 3, let
zi = yi /d − mi . Note that f (z1 , z2 , z3 ) ≤ 43 < 1. Furthermore, note that for some i, zi 6= 0.
Let D = m1 y1 + m2 y2 + m3 y3 . Let a = m21 + m22 + m23 − n and b = 2(dn − D), and for
i = 1, 2, 3, let yi0 = ayi + bmi . We have
y102 + y202 + y302 = a2 (y12 + y22 + y32 ) + b2 (m21 + m22 + m23 ) + 2abD
= n(ad + b)2
and
d(ad + b) = (y1 − dm1 )2 + (y2 − dm2 )2 + (y3 − dm3 )2
= d2 (z12 + z22 + z32 ).
Note that 0 < d2 (z12 + z22 + z32 ) < d2 , since there exists some nonzero zi and z12 + z22 + z32 < 1.
Therefore, 0 < ad+b < d. However, we now have y10 , y20 , y30 ∈ Z and f (y10 , y20 , y30 ) = (ad+b)2 n,
contradicting the minimality of d.
Thus, d = 1, and we are done. 
Proposition 8.3. If m ≡ 1 (mod 4) is a squarefree integer, then there exists a prime q of
the form 4k + 1 such that −q is a quadratic residue mod m and m is a quadratic residue mod
q.
Proof. Let m = p1 p2 · · · pk , where all the pi are distinct odd primes. Let ( ap ) be the Legendre
symbol. By the law of quadratic reciprocity, the primes ` such that ( p`i ) = 1 are completely
determined by a class of residues modulo 4pi for all i. Therefore, by Dirichlet’s theorem on
arithmetic progressions, we can find a prime q of the form 4k + 1 such that ( −q pi
) = 1 for all
−q
i. Clearly, ( m ) = 1.
We wish to show that ( mq ) = 1. We have
k  
Y −q
1=
i=1
pi
k   
Y −1 q
=
i=1
pi
pi
k   k  
Y −1 Y q
= .
i=1
pi i=1 pi
Since m ≡ 1 (mod 4), there are an even number of i’s such that pi ≡ 3 (mod 4). Thus,
k  
Y −1
= 1. Furthermore, since q ≡ 1 (mod 4), by the law of quadratic reciprocity,
i=1
p i
32
BCA 1 PROBLEM 8 BCA 1

( pqi ) = ( pqi ). Therefore,


k    
Y pi m
1= = .
i=1
q q
Thus, −q is a quadratic residue mod m and m is a quadratic residue mod q. 
Proposition 8.4. If m ≡ 2 (mod 4) is a squarefree integer, then there exists a prime q of
the form 4k + 1 such that −q is a quadratic residue mod m and m is a quadratic residue mod
q.
Proof. Let m = 2p1 p2 · · · pk , where all the pi are distinct odd primes. By an identical
argument to the proof above, we can find a prime q of the form 4k + 1 such that ( −q
pi
)=1
−q
for all i. Clearly, ( m ) = 1.
We wish to show that ( mq ) = 1. We have
k  
Y −q
1=
i=1
pi
k   
Y −1 q
=
i=1
pi pi
k   k  
Y −1 Y q
= .
i=1
pi i=1 pi
Suppose m/2 ≡ 1 (mod 4). Then there are an even number of i’s such that pi ≡ 3
k  
Y −1
(mod 4). Thus, = 1. Furthermore, since q ≡ 1 (mod 4), by the law of quadratic
i=1
p i
reciprocity, ( pqi ) = ( pqi ). Therefore,
k    
Y pi m/2
1= = .
i=1
q q
We can choose q such that q ≡ 1 (mod 8). Thus, by Lemma 8.1, ( 2q ) = 1. Thus, 1 =
( 2q )( m/2
q
) = ( mq ).
Suppose m/2 ≡ 3 (mod 4). Then there are an odd number of i’s such that pi ≡ 3
k  
Y −1
(mod 4). Thus, = −1. Furthermore, since q ≡ 1 (mod 4), by the law of quadratic
i=1
pi
reciprocity, ( pqi ) = ( pqi ). Therefore,
k    
Y pi m
−1 = = .
i=1
q q
We can choose q such that q ≡ 5 (mod 8). Thus, by Lemma 8.1, ( 2q ) = −1. Thus, 1 =
(−1)(−1) = ( 2q )( m/2
q
) = ( mq ).
Thus, there exists some prime q ≡ 1 mod 4 such that −q is a quadratic residue mod m
and m is a quadratic residue mod q. 
33
PUMAC POWER ROUND PROBLEM 8 BCA 1

Proposition 8.5. If m ≡ 3 (mod 8) is a squarefree integer, then there exists a prime q of


the form 8k + 5 such that −2q is a quadratic residue mod m and m is a quadratic residue
mod q.
Proof. Let m = p1 p2 · · · pk , where all the pi are distinct odd primes. By an identical argument
to the proof of Proposition 8.3, we can find a prime q of the form 8k + 5 such that ( −2q pi
)=1
−2q
for all i. Clearly, ( m ) = 1.
We wish to show that ( mq ) = 1. We have
k  
Y −2q
1=
i=1
pi
k   
Y −2 q
=
i=1
pi pi
k   k  
Y −2 Y q
= .
i=1
p i i=1
p i

By Lemma 8.1, ( −2 p
) = 1 when p ≡ 1, 3 (mod 8) and ( −2
p
) = −1 when p ≡ 5, 7 (mod 8).
Since m ≡ 3 (mod 8), there are an even number of i’s such that pi is congruent to 5 or 7 mod
k  
Y −2
8. Therefore, = 1. Furthermore, since q ≡ 1 (mod 4), by the law of quadratic
i=1
p i
reciprocity, ( pqi ) = ( pqi ). Therefore,
k    
Y pi m
1= = .
i=1
q q
Thus, −2q is a quadratic residue mod m and m is a quadratic residue mod q. 
Proposition 8.6. A nonnegative integer m can be represented by the sum of three integer
squares if and only if m is not of the form 4` (8k + 7).
Proof. The only if direction is clear by Proposition 8.1. Thus, we must only prove that n not
being of the form 4` (8k + 7) is a sufficient condition for the expressability of n by the sum
of three squares. Suppose n is not of the form 4` (8k + 7). By Lemma 8.4 and Proposition
8.2, it suffices to show that n can be represented as the sum of three squares over Qv for all
v. It is clear that n can be represented as the sum of three squares over R. For Qp , p 6= 2, it
suffices to show that n is representable by the sum of three squares modulo p. Consider the
sets {x2 | x ∈ Z/pZ} and {n − 1 − x2 | x ∈ Z/pZ}. Both sets have (p + 1)/2 elements, and
thus must intersect. Therefore, the equation x2 + y 2 + 1 = n has solutions modulo p for all
odd primes p.
We will now solve the problem over the 2 − adic numbers. We can divide n by the highest
power of 4 dividing n, giving us that n0 ≡ 1, 2, 3, 5, 6 (mod 8). If n0 ≡ 1 (mod 8), we have
n0 = x2 for some x ∈ Q2 . If n ≡ 2 (mod 8), we have n0 = x2 + 1 for some x ∈ Q2 . If n0 ≡ 3
(mod 8), we have n0 = x2 + 1 + 1 for some x ∈ Q2 . If n0 ≡ 5 (mod 8), we have n0 = x2 + 4
for some x ∈ Q2 . Finally, If n0 ≡ 6 (mod 8), we have n0 = x2 + 4 + 1 for some x ∈ Q2 .
Thus, all integers not of the form 4` (8k +7) can be represented by the sum of three squares
over all p-adic fields. By Lemma 8.4, these integers can be represented by the sum of three
34
BCA 1 PROBLEM 8 BCA 1

squares over Q. Finally, by Proposition 8.2, these integers can be represented by the sum of
three integer squares. 

35
PUMAC POWER ROUND PROBLEM 9 BCA 1

9. Problem 9
Definition 9.1. An integer n is summable if there exists no nonnegative integers l and k
such that n = 4l (8k + 7). An integer that is not summable is non-summable.
Lemma 9.2. If n is non-summable, then v2 (n) is even.
Proof. If n is non-summable, then there exists l, k such that n = 4l (8k + 7), so v2 (n) =
v2 (4l (8k + 7)) = v2 (4l ) + v2 (8k + 7) = 2l + 0 = 2l, which is even, as desired.

Proposition 9.1. All conic polynomials of the form f (x, y, z, w) = x2 + y 2 + z 2 + dw2 are
universal for 1 ≤ d ≤ 7.
Proof. To prove f is universal, we must show that f is positive-definite and f represents all
nonnegative integers. It’s evident by the trivial inequality that f is positive-definite. So it
suffices to prove f represents al nonnegative integers.
If n is summable, then by Proposition 8.6 there exists integers x0 , y0 , and z0 such that
n = x20 + y02 + z02 . Then n = f (x0 , y0 , z0 , 0), hence f represents n. Now suppose n is non-
summable. We wish to prove n is represented by f , which we prove with two cases on
d.
Case 1: d 6= 3. As n is non-summable, let n = 4l (8k + 7). Note that 4l (8k + 7 − d) is
summable for d 6= 3. This is clear because for even d the ”odd term” of n is 8k +  for
 ∈ {1, 3, 5} which clearly isn’t of the form 8k + 7. Moreover, for odd d, v2 (n) is odd, so n is
summable by Lemma 9.2. Thus, by Propisition 8.6 there exists integers x0 , y0 , and z0 such
that 4l (8k + 7 − d) = x20 + y02 + z02 . Note that
f (x0 , y0 , z0 , 2l ) = (x20 + y02 + z02 ) + d(2l )2
= 4l (8k + 7 − d) + 4l (d)
= 4l (8k + 7)
=n
and thus f represents all non-summable integers, completing the proof that it’s universal.
Case 2: d = 3. As n is non-summable, let n = 4l (8k + 7). If k = 0, then f (2l+1 , 0, 0, 2l ) =
(4)4l + 0 + 0 + (3)4l = (7)4l = n, so f represents n. Now assume k ≥ 1. The number
4l (8k − 5) = 4l (8(k − 1) + 3) is summable, so by Propisition 8.6, there exists integers x0 , y0 ,
and z0 such that x20 + y02 + z02 = 4l (8k − 5). Note that
f (x0 , y0 , z0 , 2 · 2l ) = (x20 + y02 + z02 ) + 3(2 · 2l )2
= 4l (8k − 5) + 4l (12)
= 4l (8k + 7)
=n
and thus f represents all non-summable integers, completing the proof that it’s universal.


36
BCA 1 PROBLEM 10 BCA 1

10. Problem 10
Proposition 10.1. Assume that a conic polynomial ax2 + by 2 + cz 2 + dw2 is universal and
let 1 ≤ a ≤ b ≤ c ≤ d. Then we have the following:
(a) a = 1
(b) b ≤ 2
(c) When b = 1, c ≤ 3, and wen b = 2, c ≤ 5
Proof. Let f (x, y, z, w) = ax2 + by 2 + cz 2 + dw2 . Suppose for sake of contradiction a 6=
1, so 2 ≤ a, b, c, d. As f is universal, there must exist integers (x0 , y0 .z0 , w0 ) such that
f (x0 , y0 .z0 , w0 ) = 1. Clearly not all of x0 , y0 , z0 , and w0 can be 0, so at least one of them is
non-zero, hence x20 + y02 + z02 + w02 ≥ 1. As 2 ≤ a, b, c, d, we have that
1 = f (x0 , y0 .z0 , w0 ) = ax20 + by02 + cz02 + dw02 ≥ 2(x20 + y02 + z02 + w02 ) ≥ 2
contradiction, thus proving a = 1 and completing part (a).
Suppose for sake of contradiction b ≥ 3. As f is universal, there must exist integers
(x0 , y0 .z0 , w0 ) such that f (x0 , y0 .z0 , w0 ) = 2. If y0 = z0 = w0 = 0, then 2 = f (x0 , y0 .z0 , w0 ) =
ax20 + 0 = x20 , impossible as 2 is not a perfect square (note that here we use the fact that
a = 1). Thus, at least one of y0 , z0 , or w0 is non-zero and thus y02 + z02 + w02 ≥ 1. By our
original supposition of contradiction, 3 ≤ b, c, d. Thus,
2 = f (x0 , y0 .z0 , w0 ) = x20 + by02 + cy02 + dw02 ≥ x20 + 3(y02 + z02 + w02 ) ≥ 3
contradiction, thus proving b ≤ 2 and completing part (b).
Now, assume b = 1. Again, for sake of contradiction suppose c ≥ 4. As f is universal, there
must exist integers (x0 , y0 .z0 , w0 ) such that f (x0 , y0 .z0 , w0 ) = 3. By the trivial inequality
(namely that x2 ≥ 0 for all real x), it’s evident that
f (x0 , y0 .z0 , w0 ) ≥ cz02 + dw02 ≥ c(z02 + w02 ) ≥ 4(z02 + w0 )2 = g(z0 , w0 )
If one of z0 or w0 is nonzero, then g(z0 , w0 ) ≥ 4, but g is a lower bound for f which is 3,
absurd. Thus, we must have that w0 = z0 = 0, so 3 = f (x0 , y0 .z0 , w0 ) = x20 + y02 , which has
no integer solutions by Proposition 2.5. Thus, our original assumption must have been false
and c ≤ 3, completing the first half of part (c).
Finally, we consider the case when b = 2. Suppose for sake of contradiction that c ≥ 6.
As f is universal, there must exist integers (x0 , y0 .z0 , w0 ) such that f (x0 , y0 .z0 , w0 ) = 5. By
the trivial inequality (namely that x2 ≥ 0 for all real x), it’s evident that
f (x0 , y0 .z0 , w0 ) ≥ cz02 + dw02 ≥ c(z02 + w02 ) ≥ 6(z02 + w0 )2 = g(z0 , w0 )
If one of z0 or w0 is nonzero, then g(z0 , w0 ) ≥ 6, but g is a lower bound for f which is 5,
absurd. Thus, we must have that w0 = z0 = 0, so 5 = f (x0 , y0 .z0 , w0 ) = x20 + 2y02 , which has
no integer solutions by Proposition 3.1. Thus, our original assumption must have been false
and c ≤ 5, completing the second half of part (c).

Proposition 10.2. The conic polynomial ax2 + by 2 + cz 2 + dw2 with 1 ≤ a ≤ b ≤ c ≤ d is
universal if and only if (a, b, c, d) satisfies one of the following conditions:
• a = 1, b = 1, c = 1, 1 ≤ d ≤ 7
• a = 1, b = 1, c = 2, 2 ≤ d ≤ 14
• a = 1, b = 1, c = 3, 3 ≤ d ≤ 6
• a = 1, b = 2, c = 2, 2 ≤ d ≤ 7
37
PUMAC POWER ROUND PROBLEM 10 BCA 1

• a = 1, b = 2, c = 3, 3 ≤ d ≤ 10
• a = 1, b = 2, c = 4, 4 ≤ d ≤ 14
• a = 1, b = 2, c = 5, 6 ≤ d ≤ 10
Proof. To establish that a conic polynomial is universal, we must demonstrate that it is
positive-definite and that it represents all positive integers. The former condition is obvious
by the trivial inequality, so we focus on the second.
We first establish that the above conditions are necessary. If
• a = 1, b = 1, c = 1, then ax2 + by 2 + cz 2 = x2 + y 2 + z 2 cannot represent 4m (8n + 7)
from proposition 8.6. In particular, it cannot represent 7. If ax2 + by 2 + cz 2 + dw2 = 7
and d > 7, then either dw2 > 7, contradiction by the trivial inequality, or w = 0 =⇒
ax2 + by 2 + cz 2 = 7, also a contradiction. Hence d ≤ 7.
• a = 1, b = 1, c = 2, then ax2 +by 2 +cz 2 = x2 +y 2 +z 2 cannot represent 4m (16n+14). In
particular, it cannot represent 14. If ax2 +by 2 +cz 2 +dw2 = 14 and d > 14, then either
dw2 > 14, contradiction by the trivial inequality, or w = 0 =⇒ ax2 + by 2 + cz 2 = 14,
also a contradiction. Hence d ≤ 14.
• a = 1, b = 1, c = 3, then ax2 + by 2 + cz 2 = x2 + y 2 + 3z 2 cannot represent 9m (9n + 6).
In particular, it cannot represent 6. Hence, by identical logic to the above cases,
d ≤ 6.
• a = 1, b = 2, c = 2, then ax2 + by 2 + cz 2 = x2 + 2y 2 + 2z 2 cannot represent 4m (8n + 7).
In particular, it cannot represent 7. Hence, by identical logic to the above cases,
d ≤ 7.
• a = 1, b = 2, c = 3, then ax2 +by 2 +cz 2 = x2 +2y 2 +3z 2 cannot represent 4m (16n+10).
In particular, it cannot represent 10. Hence, by identical logic to the above cases,
d ≤ 10.
• a = 1, b = 2, c = 4, then ax2 +by 2 +cz 2 = x2 +2y 2 +4z 2 cannot represent 4m (16n+14).
In particular, it cannot represent 14. Hence, by identical logic to the above cases,
d ≤ 14.
• a = 1, b = 2, c = 5, then ax2 +by 2 +cz 2 = x2 +2y 2 +5z 2 cannot represent 25m (25n+10)
or 25m (25n + 15). In particular, it cannot represent 10. Hence, by identical logic to
the above cases, d ≤ 10.
This establishes each of the upper bounds. The lower bounds follow from c ≤ d and the fact
that 1x2 +2y 2 +5z 2 +5w2 cannot represent 15 (which can be easily verified computationally),
hence d 6= 5 when a = 1, b = 2, c = 5.
We now demonstrate that these conditions are sufficient. Again, we treat each case sepa-
rately:
• If a = 1, b = 1, c = 1, then 1 ≤ d ≤ 7 is sufficient by proposition 9.
• If a = 1, b = 1, c = 2, then we claim that 2 ≤ d ≤ 14 is sufficient. Suppose
ax2 + by 2 + cz 2 + dw2 = x2 + y 2 + 2z 2 + dw2 = k for some k. If k is not of the
form 4m (16n + 14), then there exist x1 , y1 , z1 such that x21 + y12 + 2z12 , and then
x = x1 , y = y1 , z = z1 , w = 0 =⇒ ax2 + by 2 + cz 2 + dw2 = k. Hence it suffices to
show there exist x, y, z, w such that x2 + y 2 + 2z 2 + dw2 = 4m (16n + 14) for fixed
2 ≤ d ≤ 14, m, n. Suppose w = 2m . Then
x2 + y 2 + 2z 2 = 4m (16n + 14 − d)
0
if 4 - 16n+14−d, then 4m (16n+14−d) is not of the form 4m (16n0 +14) for any m0 , n0 ,
and so 4m (16n + 14 − d) is expressible in the form x2 + y 2 + 2z 2 as desired. Otherwise
38
BCA 1 PROBLEM 10 BCA 1

we have d = 2, 6, 10, 14. When d = 2, we have 4m (16n + 14 − d) = 4m+1 (4n + 3),


0
which is not of the form 4m (16n0 + 14) for any m0 , n0 as 16n + 14 ≡ 2 (mod 4) 6≡ 3
(mod 4). Similarly, when d = 10, we have 4m (16n + 14 − d) = 4m+1 (4n + 1), which
0
is not of the form 4m (16n0 + 14) for any m0 , n0 .
It remains to demonstrate the result for d = 6 and d = 14. If d = 6, then when
w = 2 · 2m , we have
x2 + y 2 + 2z 2 = 4m (16n − 10)
since 4 - 16n − 10 and 16n − 10 6≡ 14 (mod 16), 4m (16n − 10) is not of the form
0
4m (16n0 +14) for any m0 , n0 . Hence 4m (16n−10) is expressible in the form x2 +y 2 +2z 2
unless n = 0, in which event we have
(0)2 + (0)2 + 2(2 · 2m )2 + 6(2m )2 = 4m (16 · 0 + 14)
as desired. If d = 14, then when w = 2 · 2m we have
x2 + y 2 + 2z 2 = 4m (16n − 42)
as 4 - 16n − 42 and 16n − 42 6≡ 14 (mod 16), 4m (16n − 42) is not of the form
0
4m (16n0 +14) for any m0 , n0 . Hence 4m (16n−42) is expressible in the form x2 +y 2 +2z 2
unless n = 0, 1, 2. If n = 0, then
x2 + y 2 + 2z 2 + 14w2 = 14 · 4m
is satisfied by x = y = z = 0, w = 2m . If n = 1, then
x2 + y 2 + 2z 2 + 14w2 = 30 · 4m
is satisfied by x = 4 · 2m , y = z = 0, w = 2m . If n = 2, then
x2 + y 2 + 2z 2 + 14w2 = 46 · 4m
is satisfied by x = y = 4 · 2m , z = 0, w = 2m .
Hence x2 + y 2 + 2z 2 + dw2 is universal if and only if 2 ≤ d ≤ 14.
• If a = 1, b = 1, c = 3, then by identical logic to the above, it suffices to demonstrate
that there exist x, y, z, w satisfying
x2 + y 2 + 3z 2 + dw2 = 9m (9n + 6)
for fixed 3 ≤ d ≤ 6, m, n. When w = 2m , we have
x2 + y 2 + 3z 2 = 9m (9n + 6 − d)
0
if 9 - 9n + 6 − d, then 9m (9n + 6 − d) is not of the form 9m (9n0 + 6) for any m0 , n0 ,
and so 9m (9n + 6 − d) is expressible in the form x2 + y 2 + 2z 2 as desired. Otherwise
0
we have d = 6. If n 6≡ 6 (mod 9), then 9m+1 n is not of the form 9m (9n0 + 6) for any
m0 , n0 and we are done. Hence it suffices to show the result for n ≡ 6 (mod 9).
Let w = 2 · 3m . Then
x2 + y 2 + 3z 2 = 9m+1 (n − 2)
0
but n − 2 ≡ 4 (mod 9), hence 9m+1 (n − 2) is not of the form 9m (9n0 + 6) for any
m0 , n;, and so 9m+1 (n − 2) is expressible in the form x2 + y 2 + 3z 2 as desired unless
n = 0, 1.
When n = 0, we have
x2 + y 2 + 3z 2 + 6w2 = 6 · 9m
39
PUMAC POWER ROUND PROBLEM 10 BCA 1

is satisfied by x = y = z = 0, w = 3m , and when n = 1 we have


x2 + y 2 + 3z 2 + 6w2 = 15 · 9m
which is satisfied by x = 3 · 3m , y = z = 0, w = 3m .
Hence x2 + y 2 + 3z 2 + dw2 is universal if and only if 3 ≤ d ≤ 6.
• If a = 1, b = 2, c = 2, then by identical logic to the above, it suffices to demonstrate
that there exist x, y, z, w satisfying
x2 + 2y 2 + 2z 2 + dw2 = 4m (8n + 7)
for fixed 2 ≤ d ≤ 7, m, n. When w = 2m , we have
x2 + 2y 2 + 2z 2 = 4m (8n + 7 − d)
0
if 4 - 8n+7−d, then 4m (8n+7−d) is not of the form 4m (8n0 +7), hence 4m (8n+7−d)
is expressible in the form x2 + 2y 2 + 2z 2 as desired. Otherwise we have d = 3, 7.
If d = 3, then when w = 2 · 2m , we have
x2 + 2y 2 + 2z 2 = 4m (8n − 5)
0
but 4m (8n − 5) is not of the form 4m (8n0 + 7) for any m0 , n0 , hence 4m (8n − 5) is
expressible in the form x2 + 2y 2 + 2z 2 as desired unless n = 0. When n = 0 we have
x2 + 2y 2 + 2z 2 + 3w2 = 7 · 4m
which is satisfied by x = 0, y = z = w = 2m .
If d = 7, then when w = 2 · 2m , we have
x2 + 2y 2 + 2z 2 = 4m (8n − 21)
0
but 4m (8n − 21) is not of the for 4m (8n0 + 7) for any m0 , n0 , hence 4m (8n − 21) is
expressible in the form x2 + 2y 2 + 2z 2 as desired unless n = 0, 1, 2. When n = 0 we
have
x2 + 2y 2 + 2z 2 + 7w2 = 4m · 7
is satisfied by x = y = z = 0, w = 2m . When n = 1 we have
x2 + 2y 2 + 2z 2 + 7w2 = 4m · 15
is satisfied by x = y = 0, z = 2 · 2m , w = 2m . When n = 2 we have
x2 + 2y 2 + 2z 2 + 7w2 = 4m · 23
is satisfied by x = 0, y = z = 2 · 2m , w = 2m .
Hence x2 + 2y 2 + 2z 2 + dw2 is universal if and only if 2 ≤ d ≤ 7.
• If a = 1, b = 2, c = 3, then by identical logic to the above, it suffices to demonstrate
that there exist x, y, z, w satisfying
x2 + 2y 2 + 3z 2 + dw2 = 4m (16n + 10)
for any fixed 3 ≤ d ≤ 10, m, n. When w = 2m , we have
x2 + 2y 2 + 3z 2 = 4m (16n + 10 − d)
If 4 - 16n + 10 − d, we are done by identical logic to the above. Hence it suffices to
prove the statement for d = 6, 10. If d = 6 then 4m (16n + 10 − d) = 4n+1 (4n + 1),
0
which is not of the form 4m (16n0 + 10) for any m0 , n0 , hence it suffices to prove the
statement for d = 10.
40
BCA 1 PROBLEM 10 BCA 1

When d = 10 and w = 2 · 2m , we have


x2 + 2y 2 + 3z 2 = 4m (16n − 30)
0
which is not of the form 4m (16n0 + 10), and hence is expressible in the form x2 +
2y 2 + 3z 2 unless n = 0, 1. When n = 0 we have
x2 + 2y 2 + 3z 2 + 10w2 = 10 · 4m
is satisfied by x = y = z = 0, w = 2m . When n = 1 we have
x2 + 2y 2 + 3z 2 + 10w2 = 26 · 4m
is satisfied by x = 2 · 2m , y = 0, z = 2 · 2m , w = 2m .
Hence x2 + 2y 2 + 3z 2 + dw2 is universal if and only if 3 ≤ d ≤ 10.
• If a = 1, b = 2, c = 4, then by identical logic to the above, it suffices to demonstrate
that there exist x, y, z, w satisfying
x2 + 2y 2 + 4z 2 + dw2 = 4m (16n + 14)
for any fixed 4 ≤ d ≤ 14, m, n. When w = 2m , we have
x2 + 2y 2 + 4z 2 = 4m (16n + 14 − d)
If 4 - 16n + 14 − d, we are done by identical logic to the above. Hence it suffices to
prove the statement for d = 6, 10, 14. When d = 10, we have 4m (16n + 14 − d) =
0
4m+1 (4n + 1), which is not of the form 4m (16n0 + 14) for any m0 , n0 . Hence it suffices
to prove the statement for d = 6, 14.
When d = 6, let w = 2 · 2m . Then
x2 + 2y 2 + 4z 2 = 4m (16n − 10)
0
which is not of the form 4m (16n0 + 14) for any m0 , n0 , hence it is expressible in the
form x2 + 2y 2 + 4z 2 as desired unless n = 0. If n = 0, then
x2 + 2y 2 + 4z 2 + 6w2 = 14 · 4m
is satisfied by x = 0, y = 2 · 2m , z = 0, w = 2m .
When d = 14, let w = 2 · 2m . Then
x2 + 2y 2 + 4z 2 = 4m (16n − 42)
0
which is not of the form 4m (16n0 + 14) for any m0 , n0 , hence it is expressible in the
desired form unless n = 0, 1, 2. If n = 0, then
x2 + 2y 2 + 4z 2 + 14w2 = 14 · 4m
is satisfied by x = y = z = 0, w = 2m . If n = 1, then
x2 + 2y 2 + 4z 2 + 14w2 = 30 · 4m
is satisfied by x = y = 0, z = 2 · 2m , w = 2m . If n = 2, then
x2 + 2y 2 + 4z 2 + 14w2 = 44 · 4m
is satisfied by x = 0, y = 2 · 2m , z = 3 · 2m , w = 0.
Hence x2 + 2y 2 + 4z 2 + dw2 is universal if and only if 4 ≤ d ≤ 14.
41
PUMAC POWER ROUND PROBLEM 10 BCA 1

• If a = 1, b = 2, c = 5, then by identical logic to the above, it suffices to demonstrate


that there exist x, y, z, w satisfying x2 + 2y 2 + 5z 2 + dw2 = 25m (25n + 10) and
x2 + 2y 2 + 4z 2 + dw2 = 25m (25n + 15) for fixed 6 ≤ d ≤ 10, m, n. When w = 5m , we
have
x2 + 2y 2 + 5z 2 = 25m (25n + 10 − d)
and
x2 + 2y 2 + 5z 2 = 25m (25n + 15 − d)
both of which are expressible in the desired form unless 25 | 25n + 10 − d, 25 |
25n+15−d, or d = 5 (which we already established as x2 +2y 2 +5z 2 +5w2 cannot attain
15). Hence 25m (25n + 15 − d) is always expressible in the form x2 + 2y 2 + 5z 2 + dw2
for 6 ≤ d ≤ 10. It remains to show that 25m (25n + 10) is expressible in the form
x2 + 2y 2 + 5z 2 + 10w2 . When w = 2 · 5m we have
x2 + 2y 2 + 5z 2 = 25m (25n − 30)
0
which is not the form 25m (25n0 + 10), and can thus be expressed in the form x2 +
2y 2 + 5z 2 unless n = 0, 1. When n = 0, we have
x2 + 2y 2 + 5z 2 + 10w2 = 10 · 25m
is satisfied by x = y = z = 0, w = 5m . When n = 1, we have
x2 + 2y 2 + 5z 2 + 10w2 = 35 · 25m
is satisfied by x = 5 · 5m , y = z = 0, w = 5m .
Hence x2 + 2y 2 + 5z 2 + dw2 is universal if and only if 6 ≤ d ≤ 10.
This establishes that satisfying one of the given conditions is both necessary and sufficient
for a conic polynomial to be universal, so we have found all 54 universal conic polynomials
as desired. 

42
BCA 1 PROBLEM 11 BCA 1

11. Bonus Problems


Lemma 11.1. If n is the sum of two squares and a cube, then so is 8n.
Proof. Let n = a2 + b2 + c3 for integers a, b, c. Then
8n = (2a + 2b)2 + (2a − 2b)2 + (2c)3
as desired. 
Lemma 11.2. Every odd number is the sum of two squares and a cube.
Proof. Note that
n = 2x + 1 = (−x2 + x + 1)2 + (x3 − 3x2 + x)2 + (−x2 + 2x)3
as desired. 
Lemma 11.3. Every number equivalent to 2 mod 4 is the sum of two squares and a cube.
Proof. Note that
n = 4x + 2 = (2x3 − 4x2 − x + 1)2 + (2x3 − 2x2 − x)2 + (−2x2 + 2x + 1)3
as desired. 
Lemma 11.4. Every number equivalent to 4 mod 8 is the sum of two squares and a cube.
Proof. Note that
n = 8x + 4 = (−x2 + 2x + 1)2 + (x3 + x + 2)2 + (−x2 − 1)3
as desired. 
Proposition 11.1. Every positive integer is the sum of two squares and a cube.
Proof. For any positive integer n, write n = 8a b for integers a, b and b 6≡ 0 (mod 8). Then,
by the latter three lemmas, we can write b as the sum of two squares and a cube. Applying
Lemma 11.1 a times gives the desired result. 
Proposition 11.2. Every positive integer is the sum of three triangular numbers.
Proof. We will show that, for all n, there exist a, b, c so that n = Ta + Tb + Tc . Since 8n + 3
is never in the form 4l (8k + 7), there must exist some x, y, z such that 8n + 3 = x2 + y 2 + z 2
by Proposition 8.6. Furthermore, since 8n + 3 ≡ 3 (mod 4) and x2 ≡ 0, 1 (mod 4), we must
have x2 ≡ y 2 ≡ z 2 ≡ 1 (mod 4), hence x, y, z are all odd. We can thus write x = 2x1 + 1, y =
2y1 + 1, z = 2z1 + 1, and so
8n + 3 = (2x1 + 1)2 + (2y1 + 1)2 + (2z1 + 1)2
=⇒ 8n + 3 = 4(x21 + x1 + y12 + y1 + z12 + z1 ) + 3
x1 (x1 + 1) y1 (y1 + 1) z1 (z1 + 1)
=⇒ n = + +
2 2 2
=⇒ n = Tx1 + Tx2 + Tx3
for some integers x1 , x2 , x3 as desired. 

43

You might also like