Handout Andvaced NTTechniques Solutions
Handout Andvaced NTTechniques Solutions
divisible by p when p | x, y.
Notice furthermore that if x and y are divisible by p = 4k + 3 then p2 | x2 + y 2 . This means that if N is any
number divisible by p but not p2 , we know N cannot be written as a sum of squares.
Next, we prove there are infinitely many primes of the form 4k + 3. Suppose there are finitely many such
primes, and let them be p1 , p2 , . . . , pm . Then one of p1 p2 · · · pm + 2 or p1 p2 · · · pm + 4 is equivalent to 3 modulo
4 and is not divisible by any of the primes listed. But such a number must be divisible by some other prime of
the form 4k + 3.
We can combine the previous results with the CRT to find our sequence. Choose n primes, p0 , . . . , pn−1 , each
of which is congruent to 3 modulo 4. Consider the system
x + 0 ≡ p0 (mod p20 )
x + 1 ≡ p1 (mod p21 )
..
.
x + n − 1 ≡ pn−1 (mod p2n−1 ).
There exists some solution x to this system by the CRT. Since each x + j is divisible by some p = 4k + 3 but
not p2 we know that x + j cannot be written as a sum of two squares.
Vieta Jumping
1. Let a and b be positive integers. Show that if 4ab − 1 divides (4a2 − 1)2 , then a = b.
Solution: Since 4ab − 1 and b are relatively prime, 4ab − 1 divides (4a2 − 1)2 if and only if 4ab − 1 divides
b2 (4a2 − 1)2 . Expanding, that is
4ab − 1 | 16a4 b2 − 8b2 a2 + b2 = (4ab − 1) 4a3 b − 2ab + a2 + (a − b)2 .
Thus we must have that 4ab − 1 divides (a − b)2 . Suppose towards a contradiction that a ̸= b. Let
(a − b)2
k= >0
4ab − 1
(a − b)2
k= ≤ (a − b)2 .
4ab − 1
vp (xn − y n ) = vp (x − y) + vp (n).
Solution: First notice that if x = y then both vp (xn − y n ) and vp (x − y) are infinite so the claim is true but
uninteresting.
We break this proof into steps.
Step 1: Assume n = p. Then
so vp (xp − y p ) = vp (x − y) + vp (xp−1 + xp−2 y 1 + · · · + x1 y p−2 + y p−1 ). We want to prove that this sum is
divisible by p but not by p2 . To that end, we consider the sum modulo p2 .
Since p | x − y we can write y = x + pz for some integer z. Then by the binomial theorem
Therefore
p−1
X p−1
X
xp−k−1 y k ≡ xp−k−1 (x + pz)k
k=0 k=0
p−1
X
≡ xp−k−1 (xk + kpzxk−1 )
k=0
p−1
X p
X
≡ xp−1 + kpzxp−2
k=0 k=0
p−1
X
≡ pxp−1 + pzxp−2 k
k=0
p(p − 1)
≡ pxp−1 + pzxp−2
2
≡ pxp−1 2
(mod p ).
Note that we did not use that p was odd for this step.
Step 3: We prove the remainder of the result by induction on vp (n). The base case vp (n) = 0 is Step 2, so we
now assume p | n. We have vp (n) > 0, so we can define integers X and Y by X p = x and Y p = y. Let m = np
so X = xm and Y = y m . Fermat’s Little Theorem tells us that X − Y ≡ x − y ≡ 0 (mod p). Therefore by Step 1,
vp (xn − y n ) = vp (X p − Y p ) = vp (X − Y ) + 1 = vp (xm − y m ) + 1.
v2 (xn − y n ) ̸= v2 (x − y) + v2 (n).
3. Prove that if x and y are odd with 4 | x − y and n is a positive integer then
v2 (xn − y n ) = v2 (x − y) + v2 (n).
Solution: As in Exercise ??, Step 2, we know that if n is odd then v2 (xn − y n ) = v2 (x − y). Therefore if n = 2m k
then m m m m
v2 (xn − y n ) = v2 ((x2 )k − (y 2 )k ) = v2 (x2 − y 2 )
and v2 (n) = v2 (2m ). Therefore we may assume that n = 2m for some nonnegative m.
Now applying difference of squares m times gives
m m
m−1 m−1
m−1 m−1
x2 − y 2 = x2 + y2 x2 − y2
m−1 m−1
m−2 m−2
m−2 m−2
= x2 + y2 x2 + y2 x2 − y2
..
.
m−1 m−1
m−2 m−2
= x2 + y2 x2 + y2 · · · x2 + y 2 (x + y) (x − y).
k k
Since x and y are odd, for k positive, x2 ≡ y 2 ≡ 1 (mod 4) so their sum is even but not a multiple of 4.
Therefore if k > 0,
k k
v2 (x2 + y 2 ) = 1.
Therefore,
m−1
m m X k k
v2 (x2 − y 2 ) = v2 (x − y) + v2 (x2 + y 2 )
k=0
m−1
X
= v2 (x − y) + v2 (x + y) + 1
k=1
= v2 (x − y) + v2 (x + y) + m − 1.
4. Prove that if x and y are odd and n is an even positive integer then
v2 (xn − y n ) = v2 (x − y) + v2 (x + y) + v2 (n) − 1.