0% found this document useful (0 votes)
162 views18 pages

Sum of Distinct Biquadratic Residues Modulo Primes

1. The document summarizes the proof of two conjectures regarding the sum of outputs of biquadratic polynomials modulo primes. 2. It is proven that for a polynomial f(x) = x4 + cx2 + e, where c is not divisible by the prime p ≥ 7, there is a formula for the sum of distinct outputs of f modulo p. This formula splits into eight cases depending on p modulo 8 and whether c is a quadratic residue modulo p. 3. It is also proven that the set of such sums, as the coefficient c varies, can be expressed in terms of the sets of squares and fourth powers modulo p, resolving another conjecture. Manual computations are provided for excluded prime mod

Uploaded by

John Smith
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
162 views18 pages

Sum of Distinct Biquadratic Residues Modulo Primes

1. The document summarizes the proof of two conjectures regarding the sum of outputs of biquadratic polynomials modulo primes. 2. It is proven that for a polynomial f(x) = x4 + cx2 + e, where c is not divisible by the prime p ≥ 7, there is a formula for the sum of distinct outputs of f modulo p. This formula splits into eight cases depending on p modulo 8 and whether c is a quadratic residue modulo p. 3. It is also proven that the set of such sums, as the coefficient c varies, can be expressed in terms of the sets of squares and fourth powers modulo p, resolving another conjecture. Manual computations are provided for excluded prime mod

Uploaded by

John Smith
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Sum of Distinct Biquadratic Residues Modulo Primes

Samer Seraj∗
arXiv:2309.13070v1 [math.NT] 18 Sep 2023

September 26, 2023

Abstract
Two conjectures, posed by Finch-Smith, Harrington, and Wong in a paper published
in Integers in 2023, are proven. Given a monic biquadratic polynomial f (x) = x4 +
cx2 + e, we prove a formula for the sum of its distinct outputs modulo any prime p ≥ 7.
Here, c is an integer not divisible by p and e is any integer. The formula splits into
eight cases, depending on the remainder of p modulo 8 and whether c is a quadratic
residue modulo p. The formula quickly extends to the non-monic case. We then apply
the formula to prove a classification of the set of such sums in terms of the sets of
squares and fourth powers, when c in x4 + cx2 is varied over all integers with a fixed
prime modulus p ≥ 7. The sum and the set of sums are manually computed for the
excluded prime moduli p = 3, 5.

1 Introduction
Definition 1. For an integer polynomial f ∈ Z[x] and a modulus n, let

Rn (f ) = {f (x) (mod n) : x ∈ Z}.

be the set of distinct outputs of f (x) modulo n as x ranges over the integers. Note that this
is a finite set because the inputs x = 0, 1, 2, . . . , n − 1 lead to all outputs modulo n, most
likely with repetition.

A fewXnatural questions arise,Y


including the determination of the cardinality |Rn (f )|, and
the sum Rn (f ) and product Rn (f ) of these distinct outputs modulo n. The general
quadratic sum modulo primes was resolved by Gross, Harrington, and Minott, building on
the much earlier work of Stetson [5] on the residues of triangular numbers. The main result
of [1] was to determine the sum of distinct residues module primes of the general cubic
polynomial.
Let p ≥ 7 be any fixed prime modulus for the remainder of the paper, so that the notation
R(f ) may be used instead of Rp (f ). Also, all congruences without a stated modulus are

samer_seraj@outlook.com, Existsforall Academy

1
X
understood to be modulo p. The present paper first proves a formula for R(x4 + cx2 + e)
that was conjectured in a paper of Finch-Smith, Harrington, and Wong [1, p. 7]. The formula
for c ≡ 0 (mod p) is given in [1, p. 4], so we will focus on p ∤ c.
One can also ask for a classification of the structure of the set of distinct sums produced
as the coefficients of f vary over the integers. This is defined in a specific relevant case as
follows.
Definition 2. Let
nX o
S(p) = Rp (x4 + cx2 ) : c = 0, 1, 2, . . . , p − 1

be the set of all distinct sums Rp (x4 +cx2 ). Note that, since we are working with a polynomial
modulo p, defining S(p) using c ∈ {0, 1, 2, . . . , p − 1} is equivalent to using all integers c.
Our second goal is to express the sets of sums S(p) in terms of Rp (x2 ) and Rp (x4 ), which
will resolve another conjecture of Finch-Smith, Harrington, and Wong [1, p. 6].
Definition 3. We define following sets:
1. Let Zp = {0, 1, 2, . . . , p−1}, with the standard operations of addition and multiplication
defined on it modulo p.
2. Let A0 = {a ∈ Zp : ∃x ∈ Zp \{0}, x2 ≡ a (mod p)} be the set of quadratic residues
modulo p, which does not include the 0 residue. Let A′0 = A0 ∪ {0}.
3. Let A1 = Zp \A′0 be the set of quadratic non-residues modulo p, which also does not
include 0. Let A1 ∪ {0} = A′1 .
4. For a set of inputs S and a polynomial g, let Ra∈S (g(a)) denote the set of distinct
outputs of g(a) modulo p, as a ranges over S.
5. For any positive integer t, let [t] = {1, 2, . . . , t}.
Definition 4. The Legendre symbol is defined for integers a as

    1 if a ∈ A0
a
= 0 if p | a .
p 
−1 if a ∈ A1

This lends consistency to the notation of A0 and A1 because 1 = (−1)0 and −1 = (−1)1 ,
matching the Legendre symbol.

2 The Sum of Distinct Residues


Lemma 5 (First supplement to quadratic reciprocity).
  (
−1 1 if p ≡ 1, 5 (mod 8),
=
p −1 if p ≡ 3, 7 (mod 8)

2
Lemma 6 (Second supplement to quadratic reciprocity).
  (
2 1 if p ≡ 1, 7 (mod 8),
=
p −1 if p ≡ 3, 5 (mod 8)
 
a
Lemma 7. Let r ∈ A0 and s ∈ A1 . Due to the fact that the Legendre symbol in the
p
p−1
variable a is completely multiplicative, the fact that |A0 | = |A1 | = , and a standard
2
permutation or coset argument,
r · A0 = s · A1 = A0 ,
s · A0 = r · A1 = A1 .
Here, the multiplication of an element against a set denotes the multiplication of every
member of the set by that constant
 element
 to produce a new set. As a result, if p ≡
−1
3 (mod 4), since Lemma 5 says = −1, we get A1 = (−1) · A0 , or, equivalently,
p
(−1) · A1 = A0 .
We outline several reductions:
1. Firstly, since x4 + cx2 + e is the composition of x2 + cx + e over x2 , it suffices to
instead compute the sum of all distinct a2 + ca + e modulo p, as a ranges over A′0 .
The distinctness of the summands a2 + ca + e is a key difficulty, as there will likely
be repeated summands when a iterates over A′0 . In terms of the notation described in
Definition 3, we denote this set of distinct summands as Ra∈A′0 (a2 + ca + e) in order to
specify that a must be a quadratic residue or 0, and not just any arbitrary element of
Zp .
2. Secondly, since e is a constant,
X X
Ra∈A′0 (a2 + ca + e) ≡ Ra∈A′0 (a2 + ca) + |Ra∈A′0 (a2 + ca)| · e,
so it suffices to compute the sum and cardinality on the right side separately.
3. Thirdly, using the notation t · S to mean that all elements of the set S are multiplied
by t,
Ra∈A′0 (a2 + ca) = c2 · Ra∈A′0 ((c−1 a)2 + (c−1 a)).
By Lemma 7, (
−1 A′0 if c ∈ A0 ,
c · A′0 = .
A′1 if c ∈ A1
X
If c ∈ A0 , it suffices to compute Ra∈A′0 (a2 + ca + e) as
X
c2 · Ra∈A′0 (a2 + a) + |Ra∈A′0 (a2 + a)| · e.
If c ∈ A1 , we compute it as
X
c2 · Ra∈A′1 (a2 + a) + |Ra∈A′1 (a2 + a)| · e.

3
The basic idea behind computing the sums and cardinalities of the sets Ra∈A′0 (a2 + a)
and Ra∈A′1 (a2 + a) is to first forget about distinctness of a2 + a as a ranges over A′0 or A′1 ,
and then remove the repetition.
Lemma 8. For any prime p ≥ 7 and k = 1, 2, and 4,
p−1
X
ik ≡ 0 (mod p).
i=1
X
Subsequently, ak ≡ 0 (mod p) for k = 1 and 2.
a∈A′0

Proof. Faulhaber’s formulas for k = 1, 2, and 4 state that


p−1
X 1
i= · (p − 1)p,
i=1
2
p−1
X 1
i2 = · (p − 1)p(2p − 1),
i=1
2·3
p−1
X 1
i4 = · (p − 1)p(2p − 1)(3p2 − 3p − 1),
i=1
2·3·5
which are all 0 modulo p because of the factor p. We have used the invertibility of the
denominators 2, 3, and 5 modulo primes p ≥ 7 here.
It is well-known that every element a ∈ A0 has exactly two distinct square roots i ∈ [p−1],
and the only square root of 0 is 0 which does not alter the sum, so the consequence follows
from dividing the second and third zero sums by 2 or multiplying them by 2−1 .
As a result of Lemma 8,
X
(a2 + a) ≡ 0 (mod p),
a∈A′0

which means that what will really matter is the sum of the repeated terms that will be
subtracted from this 0 sum. Moreover, since 02 + 0 ≡ 0 does not contribute anything to a
sum, X X
(a2 + a) ≡ (a2 + a) (mod p),
a∈A0 a∈A′0

and, similarly, the same sums over A1 and A′1 are congruent.
Now we will classify when a2 +a is congruent to b2 +b for a, b ∈ A′0 in order to understand
when repetition occurs.
Lemma 9. Suppose a 6≡ b and a2 + a ≡ b2 + b. This holds if and only if b ≡ −a − 1.
Moreover, since we will require both a, b ∈ A′0 or both a, b ∈ A′1 , the following criteria will
be helpful:
    (
b a+1 1 if p ≡ 1, 5 (mod 8),
1= ⇐⇒ = ,
p p −1 if p ≡ 3, 7 (mod 8)

4
    (
b a+1 −1 if p ≡ 1, 5 (mod 8),
−1 = ⇐⇒ =
p p 1 if p ≡ 3, 7 (mod 8)

Also, a2 + a ≡ 0 if and only if a ≡ 0, −1.


Proof. Assuming a 6≡ b, we manipulate

a2 + a ≡ b2 + b ⇐⇒ (a − b)(a + b + 1) ≡ 0 ⇐⇒ b ≡ −a − 1.

For the second point,


      
i b −a − 1 −1 a + 1
(−1) = = = ,
p p p p
   
a+1 i −1
which is true if and only if = (−1) · , where i = 0, 1. The result follows
p p
from applying Lemma 5.
Lastly, 0 ≡ a2 + a ≡ a(a + 1) if and only if a ≡ 0, −1. Note that, by Lemma 5, −1 is not
always a quadratic residue modulo p.
Lemma 9 motivates the definitions of the following sets.
Definition 10. Following the notation in [4, p. 29], for i, j ∈ {0, 1}, let

Aij = {a ∈ [p − 1] : a ∈ Ai , a + 1 ∈ Aj } .

For example, A01 consists of a ∈ [p − 1] such that a is a quadratic residue and a + 1 is a


quadratic non-residue. In fact, we could have used [p − 2] instead of [p − 1] because, for
a ≡ p − 1, we have a + 1 ≡ 0, which is not included in A0 or A1 .
It is evident from Lemma 9 that we must study the structure of the Aij . Next, Lemma
11 studies a construction of A00 .
" 2 #p−1
w −1 − w
Lemma 11. Modulo p, the set A00 is “generated” by the list in the sense
2
w=1
that:
1. Every element of A00 appears at least once.

2. Elements of Zp outside of A00 ∪{0} do not appear, except −1, which appears if −1 ∈ A0 ,
and 0, which always appears.

3. Every element of A00 , which is a set that excludes 0 and −1, appears exactly four
times.
Since 02 + 0 ≡ (−1)2 + (−1) ≡ 0, their irregular number of occurrences does not affect the
fact that
p−1  −1
" 4  −1 2 #
X 1 X w − w w − w
(a2 + a) ≡ · + .
a∈A
4 w=1 2 2
00

5
Proof. Suppose (x, y) ∈ Z2p such that x2 + 1 ≡ y 2 . Then

1 ≡ y 2 − x2 ≡ (y − x)(y + x).

Since y 6≡ x (otherwise the above congruence would equal 0 instead of 1), let w ≡ y − x, and
so y + x ≡ w −1 . Solving this system yields
 −1 
w − w w −1 + w
(x, y) = , ,
2 2

which shows that x2 does appear in the stated list. It may be verified that, for these (x, y),
it holds that x2 + 1 = y 2 . So, only elements of A00 ∪ {0}, along with −1 if −1 ∈ A0 , are
generated by the list.
Now we count repetition in the list. Suppose w, z ∈ Zp \{0} such that
 2  −1 2
w −1 − w z −z

2 2
⇐⇒ 0 ≡ (w − w) − (z − z)2
−1 2 −1

⇐⇒ 0 ≡ (w − z)(w + z)(wz − 1)(wz + 1) ⇐⇒ z ≡ ±w, ±w −1 .

We claim that some of these four z are congruent if and only if w 2 ≡ ±1. It is impossible
that w ≡ −w or w −1 ≡ −w −1 because p 6= 2 and p ∤ w. If w ≡ w −1 or w ≡ w −1 , then
w 2 ≡ 1. If w ≡ −w −1 or −w ≡ w −1 , then w 2 ≡ −1. In these cases,
2
w −2 + w 2 − 2
 −1
w −w
≡ ≡ 0, −1.
2 4

Thus, all congruence classes of A00 are covered exactly four times. Note that w 2 ≡ −1 occurs
for some w ∈ Zp precisely when p ≡ 1, 5 (mod 8), by Lemma 5.
p−1
There are times when a = appears in Aij . In such cases, it requires special
2
consideration because it is the only a ∈ Zp for which (a, a + 1) and (b, b + 1) = (−a − 1, −a)
are identical. This leads to studying Lemma 12 below.
p−1
 !      p+1
!  
2 −2 −1 2 2 2
Lemma 12. Note that = = and = . As a direct
p p p p p p
consequence of Lemma 5 and Lemma 6,

 (1, 1) if p ≡ 1 (mod 8)
     
−2 2  (1, −1) if p ≡ 3 (mod 8)
, = .
p p 
 (−1, −1) if p ≡ 5 (mod 8)

(−1, 1) if p ≡ 7 (mod 8)

We will now compute the values of the subtraction sums modulo p.

6
Lemma 13. Modulo p, we compute
X X 1
(a2 + a) ≡ (a2 + a) ≡ ,
a∈A00 a∈A11
32
X X 1
(a2 + a) ≡ (a2 + a) ≡ − .
a∈A01 a∈A10
32

Proof. The computations begin with noticing the following splittings, where it is used that
excluding the index a = −1, which is sometimes in A0 or A1 on the left, from the sums on
the right (because a + 1 ≡ 0) does not make a difference to the identities,
X X X
(a2 + a) ≡ (a2 + a) + (a2 + a),
a∈A0 a∈A00 a∈A01
X X X
2 2
(a + a) ≡ (a + a) + (a2 + a).
a∈A1 a∈A10 a∈A11

Moreover, using Lemma 8,


p−1
X X X
2 2
(a + a) + (a + a) ≡ (a2 + a) ≡ 0.
a∈A0 a∈A1 a=1

Next, we use Lemma 11 to compute


p−1  −1
" 4  −1 2 #
X 1 X w − w w − w
(a2 + a) ≡ · +
a∈A00
4 w=1
2 2
p−1  p−1
1 X w −4 + w 4 − 2 1 X w4 − 1

≡ · ≡ ·
4 w=1 16 4 w=1 8
p−1 p−1
!
1 X
4
X p−1 1
≡ · w − 1 ≡− ≡ ,
32 w=1 w=1
32 32

where Lemma 8 was used again. We remarked after Lemma 8 that


X X
(a2 + a) ≡ (a2 + a) ≡ 0,
a∈A0 a∈A′0

which leads to X X X 1
(a2 + a) ≡ (a2 + a) − (a2 + a) ≡ − .
a∈A01 a∈A0 a∈A00
32
By using changes of variables and Lemma 8 again,
X X X
(a2 + a) ≡ a(a + 1) ≡ (a − 1)a
a∈A10 a∈A1 (a−1)∈A1
(a+1)∈A0 a∈A0

7
X X
≡ a(a − 1) − a(a − 1)
a∈A0 (a−1)∈A0
a∈A0
p−1
1 X 2 X
≡ · (i − i) − (a + 1)a
2 i=1 a∈A0
(a+1)∈A0
X 1
≡0− (a2 + a) ≡ − .
a∈A00
32

In the second line of the computations above, there should technically have been a sub-
traction of 1(1 − 1) ≡ 0 to account for the index a − 1 = 0, but this is of no consequence.
For the final computation, we see that
X X X X
(a2 + a) + (a2 + a) ≡ (a2 + a) ≡ − (a2 + a) ≡ 0,
a∈A10 a∈A11 a∈A1 a∈A0
X X 1
(a2 + a) ≡ − (a2 + a) ≡ .
a∈A11 a∈A10
32

The legwork so far will be able to handle the sum part of the computation. For the
cardinality part, we quote Lemma 14 below.

Lemma 14. According to [4, p. 29],

1. If p ≡ 1, 5 (mod 8), then


p−5 p−1
|A00 | = , |A01 | = |A10 | = |A11 | = .
4 4

2. If p ≡ 3, 7 (mod 8), then


p+1 p−3
|A01 | = , |A00 | = |A10 | = |A11 | = .
4 4

Now, we are ready to prove the theorem that computes the sum.

Theorem 15. Let p ≥ 7 be a prime. Then


X
R(x4 + cx2 + e) ≡ V c2 + W e (mod p),

where we compute V and W , using the collected data in the table beneath, as
  
X
2 c
Ra∈A′0 (a + a) if =1


 p

V ≡ X
c
Ra∈A′1 (a2 + a) if = −1


p

8
 
 
1 X 1
≡− · (a2 + a) − − if “Yes”  (mod p),
2 a∈A 4
ij

and
  
c
|Ra∈A′0 (a2 + a)| if =1


W ≡  p
c
|Ra∈A′1 (a2 + a)| if = −1


p
1
≡ |Ai \{−1}| − · [|Aij | − (1 if “Yes”)] + 1 (mod p).
2
 
c p−1 X
p Ai Aij ∈ Aij (a2 + a) |Aij | |Ai \{−1}|
p 2 a∈Aij

1 p−5 p−3
1 1 A0 A00 Yes
32 4 2
1 p+1 p−1
3 1 A0 A01 Yes −
32 4 2
1 p−5 p−3
5 1 A0 A00 No
32 4 2
1 p+1 p−1
7 1 A0 A01 No −
32 4 2
1 p−1 p−1
1 −1 A1 A11 No
32 4 2
1 p−3 p−3
3 −1 A1 A10 No −
32 4 2
1 p−1 p−1
5 −1 A1 A11 Yes
32 4 2
1 p−3 p−3
7 −1 A1 A10 Yes −
32 4 2
Proof. We will describe the columns, how they were obtained, and how they contribute to
the various components of the formulas:

1. The p column indicates the remainder of p modulo 8.


 
c
2. The column says whether c is a quadratic residue or a quadratic non-residue
p
modulo p.
   
c c
3. The Ai column is A0 if = 1 and is A1 if = −1. For the computation of V ,
X p p
we start with (a2 + a) ≡ 0 and later subtract duplicate summands.
a∈Ai

9
4. The Aij column states the set in which belongs the a ∈ Zp that resulted in 
non-trivial
X c
duplicate summands in (a2 + a). The index i again corresponds to = (−1)i .
a∈Ai
p
 
a+1
The index j is determined by the requirement = (−1)j , which is found using
p
Lemma 9.
p−1 p−1
5. The ∈ Aij column determines whether a = needs to be omitted from Aij
2 2
when duplicates are removed from Ai . As explained before Lemma 12, this is because
the pair (a, a + 1) and (b, b + 1) = (−a − 1, −a) are actually the same modulo p. So,
p−1
even if a = ∈ Aij , it has not been included twice originally and needs not be
2
subtracted. This column was computed using Lemma 12.
X 1
6. The (a2 + a) column was computed in Lemma 13. The factors of in V and
a∈A
2
ij

W come from the fact that we want to remove only one of each pair  1) and
  (a, a +
1 p−1 p+1 1
(b, b+1) = (−a−1, −a). Note that the − in V comes from · ≡− .
4 2 2 4
7. The |Aij | column follows directly from Lemma 14.

8. The |Ai \{−1}| column was found by considering whether a = −1 was already in Ai ,
p−1
using Lemma 5. If so, 1 was subtracted from |Ai | = The reason that it is
2
removed is that a + 1 = 0, and we want to avoid the pairs (a, a + 1) = (−1, 0) and
(b, b + 1) = (−a − 1, −a) = (0, 1) in the initial count; b = 0 is not in Ai by definition.
One of a = 0, −1 is placed back into the computation of W with the +1 on the far
right of W .

Therefore, the general idea behind both the sum computation and the cardinality compu-
tation is to find it with repetition among the summands or elements, then remove repeated
ones (which can only exist in dual pairs), while considering whether the middle terms of Zp
form such a dual pair.

Corollary 16. Theorem 15, works out explicitly as follows, as predicted by the authors of

10
[1, p. 7].
 
c
p (mod 8) V W
p
9 5
1 1 −
64 8
7 7
3 1 −
64 8
1 1
5 1 −
64 8
1 3
7 1
64 8
1 5
1 −1 −
64 8
1 1
3 −1 −
64 8
9 9
5 −1 −
64 8
7 3
7 −1 −
64 8
Proof. For illustrative purposes, we compute V and W in the first row. Following the formula
and data in Theorem 15,
 
 
1 X 1
V ≡− · (a2 + a) − − if “Yes” 
2 a∈A 4
ij
  
1 1 1 9
≡− · − − ≡− (mod p),
2 32 4 64
1
W ≡ |Ai \{−1}| − · [|Aij | − (1 if “Yes”)] + 1
2 
p−3 1 p−5 5
≡ − · −1 +1≡ (mod p).
2 2 4 8
The other rows follow similarly, completing the proof of the conjecture in [1, p. 7].
We acknowledge that the result extends easily to the non-monic case. For any leading
coefficient a 6≡ 0 (mod p),
R(ax4 + cx2 + e) = a · R(x4 + a−1 cx2 + a−1 e).
So, beyond
  fixing
 the
 remainder of p modulo 8, the criteria for casework becomes whether
a−1 c a c
= is 1 or −1. This tacks on one copy of a in the denominator of the first
p p p   
a c
term of each case. For example, if p ≡ 1 (mod 8) and = 1, then
p p
X X
R(ax4 + cx2 + e) ≡ a · R(x4 + a−1 cx2 + a−1 e)

11
−9a−2 c2 5a−1 e −9c2 5e
 
≡a· + ≡ + .
64 8 64a 8

3 The Set of Sums


Now we will compute S(p), as defined in Definition 2, in terms of Rp (x2 ) and Rp (x4 ). We
start by reorganizing Corollary 16 as follows.
X
Lemma 17. For f (x) = x4 + cx2 + e, where c and e are integers such that p ∤ c, R(f )
may be computed  across eight cases as follows, according to the remainder of p modulo 8,
c
and whether = 1 or −1.
p
   
c c
p (mod 8) =1 = −1
p p
7 7 1 2 1
3 − c2 + e c − e
64 8 64 8
1 2 3 7 2 3
7 c + e − c + e
64 8 64 8
9 2 5 1 2 5
1 − c + e − c + e
64 8 64 8
1 2 1 9 2 9
5 − c + e − c + e
64 8 64 8
For p | c, [1, p. 4] proves that
X
R(x4 ) ≡ 0 (mod p).

We will need some results about quartic residues.


Definition 18. For our purposes, we define the power residue symbol for integers a and
k ≥ 2 as 
k
 
a  1 if x ≡ a (mod p) has a non-zero solution x

= 0 if a ≡ 0 (mod p) .
p k 
−1 otherwise

   
a a
If k = 2, we drop the subscript of 2 from the power residue symbol = , as is
p 2 p
typical for the Legendre symbol, as defined in Definition 4.
Lemma 19. According to Gauss [2, § 3], if p ≡ 3 (mod 4) and a is an integer, then
   
a a
= 1 ⇐⇒ = 1.
p 4 p
As a result of Lemma 5, if p ≡ 3 (mod 4), then
 
−1
= −1.
p 4

12
Also according to Gauss [2, § 10], if p ≡ 1 (mod 4), then there are two cases
  (
−1 1 if p ≡ 1 (mod 8)
= .
p 4 −1 if p ≡ 5 (mod 8)

Theorem 20. Let p ≡ 3 (mod 4). Then


(
Zp if − 1 ∈ S(p)
S(p) = .
R(x2 ) if − 1 6∈ S(p)

Proof. Suppose p ≡ 3 (mod 8). By the first row of Lemma 17, the fact that 2 ∈ A1 from
Lemma 6, and applying Lemma 7 to multiply A0 or A1 by 2−2 ∈ A0 or 2−1 ∈ A1 ,
   
7 2 1 2
S(p) = Rc∈A0 − c ∪ Rc∈A1 c ∪ {0}
64 64
= Rc∈A0 −7(2−1 · 2−2 · c)2 ∪ Rc∈A1 (2−1 · 2−2 · c)2 ∪ {0}
 

= Rc∈A0 −7(2−1 · c)2 ∪ Rc∈A1 (2−1 · c)2 ∪ {0}


 

= Rc∈A1 −7c2 ∪ Rc∈A0 c2 ∪ {0}.


 

Now suppose p ≡ 7 (mod 8). By the second row of Lemma 17, the fact that 2 ∈ A0 by
Lemma 6, and a usage of Lemma 7 that is similar to the previous case,
   
1 2 7 2
S(p) = Rc∈A0 c ∪ Rc∈A1 − c ∪ {0}
64 64
= Rc∈A0 (2 · 2 · c) ∪ Rc∈A1 −7(2−1 · 2−2 · c)2 ∪ {0}
2
−1 −2
 

= Rc∈A0 (2−1 · c)2 ∪ Rc∈A1 −7(2−1 · c)2 ∪ {0}


 

= Rc∈A0 c2 ∪ Rc∈A1 −7c2 ∪ {0}.


 

Thus, for both p ≡ 3, 7 (mod 8), and so for p ≡ 3 (mod 4) in general,


S(p) = Rc∈A0 c2 ∪ Rc∈A1 −7c2 ∪ {0}.
 

By Lemma 7, A1 = −A0 . Separately, since x4 = (x2 )2 , the set of quartic residues is the set
of squares of quadratic residues; in the case of p ≡ 3 (mod 4), Lemma 19 says that the set
of quartic residues is also the set of quadratic residues. Then the set of squares of quadratic
residues is the set of quadratic residues. So we get
S(p) = Rc∈A0 c2 ∪ Rc∈A0 −7(−c)2 ∪ {0}
 

= Rc∈A0 c2 ∪ Rc∈A0 −7c2 ∪ {0}


 

= Rc∈A0 (c) ∪ Rc∈A0 (−7c) ∪ {0}.


Recall that, since it is assumed that p ≡ 3 (mod 4), Lemma 5 says that −1 ∈ A1 . As a
result, in the above representation of S(p), we see that −1 6∈ Rc∈A0 (c), so
−1 ∈ S(p) ⇐⇒ −1 ∈ Rc∈A0 (−7c) .
This biconditional statement is equivalent to 7 having an inverse that is in A0 , which is
equivalent to 7 itself being in A0 . Therefore, using −1 ∈ A1 :

13
1. If −1 ∈ S(p), then 7 ∈ A0 , so

S(p) = Rc∈A0 (c) ∪ Rc∈A0 (−7c) ∪ {0}


= Rc∈A0 (c) ∪ Rc∈A0 (−c) ∪ {0}
= Rc∈A0 (c) ∪ Rc∈A1 (c) ∪ {0}
= Zp .

2. If −1 6∈ S(p), then 7 ∈ A1 or p = 7. In the 7 ∈ A1 case,

S(p) = Rc∈A0 (c) ∪ Rc∈A0 (−7c) ∪ {0}


= Rc∈A0 (c) ∪ Rc∈A1 (−c) ∪ {0}
= Rc∈A0 (c) ∪ Rc∈A0 (c) ∪ {0}
= R(x2 ).

If p = 7, then

S(p) = Rc∈A0 (c) ∪ Rc∈A0 (−7c) ∪ {0}


= Rc∈A0 (c) ∪ Rc∈A0 (0) ∪ {0}
= Rc∈A0 (c) ∪ {0}
= R(x2 ).

Either way, if −1 6∈ S(p), then S(p) = R(x2 ).

Theorem 21. Let p ≡ 1 (mod 4). Then




 R(x2 ) if − 1 ∈ S(p)
S(p) = R(x4 ) if − 1 6∈ S(p), p ≡ 5 (mod 8) .
R(x2 )\R(x4 ) ∪ {0}
 
if − 1 ∈6 S(p), p ≡ 1 (mod 8)

Proof. Suppose p ≡ 1 (mod 8). By the third row of Lemma 17, the fact that 2 ∈ A0 from
Lemma 6, and using Lemma 7 to multiply A0 or A1 by 2−2 ∈ A0 or 2−1 ∈ A0 ,
   
9 2 1 2
S(p) = Rc∈A0 − c ∪ Rc∈A1 − c ∪ {0}
64 64
= Rc∈A0 −(3 · 2 · 2 · c) ∪ Rc∈A1 −(2−1 · 2−2 · c)2 ∪ {0}
2
−1 −2
 

= Rc∈A0 −(3 · 2−1 · c)2 ∪ Rc∈A1 −(2−1 · c)2 ∪ {0}


 

= Rc∈A0 −(3c)2 ∪ Rc∈A1 −c2 ∪ {0}.


 

Now suppose p ≡ 5 (mod 8). By the fourth row of Lemma 17, the fact that 2 ∈ A1 by
Lemma 6, and a usage of Lemma 7 that is similar to the previous case,
   
1 2 9 2
S(p) = Rc∈A0 − c ∪ Rc∈A1 − c ∪ {0}
64 64

14
= Rc∈A0 −(2−1 · 2−2 · c)2 ∪ Rc∈A1 −(3 · 2−1 · 2−2 · c)2 ∪ {0}
 

= Rc∈A0 −(2−1 · c)2 ∪ Rc∈A1 −(3 · 2−1 · c)2 ∪ {0}


 

= Rc∈A1 −c2 ∪ Rc∈A0 −(3c)2 ∪ {0}.


 

Thus, for both p ≡ 1, 5 (mod 8), and so for p ≡ 1 (mod 4) in general,

S(p) = Rc∈A0 −(3c)2 ∪ Rc∈A1 −c2 ∪ {0}.


 

We claim that −1 6∈ Rc∈A1 −c2 . This is because




−1 ∈ Rc∈A1 −c2 ⇐⇒ c2 = 1 ⇐⇒ c = ±1


for some c ∈ A1 . But both 1 and −1 are in A0 for p ≡ 1 (mod 4),by Lemma 5. As a result,
in the above representation of S(p), we see that −1 6∈ Rc∈A1 −c2 , so

−1 ∈ S(p) ⇐⇒ −1 ∈ Rc∈A0 −(3c)2 .




This biconditional statement is equivalent to there existing a c ∈ A0 such that −(3c)2 = −1,
which is equivalent to 3c = 1 or 3c = −1. In turn, since −1 ∈ A0 for p ≡ (mod 4), the
possibility of 3c = −1 can be absorbed into the possibility of 3c = 1, which is equivalent to
3 ∈ A0 . Therefore, using −1 ∈ A0 :
1. Suppose p ≡ 1 (mod 4) and −1 ∈ S(p). Then 3 ∈ A0 by above, so

S(p) = Rc∈A0 −(3c)2 ∪ Rc∈A1 −c2 ∪ {0}


 

= Rc∈A0 −c2 ∪ Rc∈A1 −c2 ∪ {0}


 

= Rc∈Zp −c2


= (−1) · A′0 = A′0 = R(x2 ).

2. Suppose p ≡ 1 (mod 4) and −1 6∈ S(p). Then 3 ∈ A1 by above, so

S(p) = Rc∈A0 −(3c)2 ∪ Rc∈A1 −c2 ∪ {0}


 

= Rc∈A1 −c2 ∪ Rc∈A1 −c2 ∪ {0}


 

= Rc∈A1 −c2 ∪ {0}.




   
−1 −1
(a) Suppose p ≡ 5 (mod 8). Then = −1, but = 1. The latter implies
p 4 p
that −1 ≡ γ 2 (mod p) for some γ ∈ Zp \{0}, and the former ensures that γ 6∈ A0 ,
otherwise −1 would be the square of a quadratic residue, as in a quartic residue.
So γ ∈ A1 , implying

S(p) = Rc∈A1 −c2 ∪ {0}




= Rc∈A1 γ 2 c2 ∪ {0}


= Rc∈A1 (γc)2 ∪ {0}




= Rc∈A0 c2 ∪ {0}


= R(x4 ).

15
 
−1
(b) Suppose p ≡ 1 (mod 8). Then = 1. So −1 ≡ δ 4 ≡ (δ 2 )2 (mod p) for
p 4
some δ ∈ Zp \{0}. Taking γ = δ 2 , we get that γ ∈ A0 such that γ 2 ≡ −1 (mod p).
Then

S(p) = Rc∈A1 −c2 ∪ {0}




= Rc∈A1 γ 2 c2 ∪ {0}


= Rc∈A1 (γc)2 ∪ {0}




= Rc∈A1 c2 ∪ {0}.


According to Gauss [2, § 4-7], Rc∈A1 c2 is precisely the set of quadratic residues


that are not quartic residues, which produces the desired representation

S(p) = R(x2 )\R(x4 ) ∪ {0}.




Theorem 20 and Theorem 21 maybe reformulated in terms of explicit congruence classes


of p as follows.

Corollary 22. For any prime p ≥ 7,




 Zp if p ≡ 3, 19, 27 (mod 28)

R(x2 ) if p ≡ 7, 11, 15, 23 (mod 28)




S(p) = R(x2 ) if p ≡ 1, 13 (mod 24) ,
R(x4 )

if p ≡ 5, 21 (mod 24)




 R(x2 )\R(x4 ) ∪ {0}
 
if p ≡ 9, 17 (mod 24)

where p ≡ 3 (mod 4) in the first two cases and p ≡ 1 (mod 4) in the last three cases.

Proof. Using quadratic reciprocity, it is known that 7 ∈ A0 if and only if p ≡ ±1, ±3 ± 9


(mod 28), and that 3 ∈ A0 if and only if p ≡ ±1 (mod 12).

1. Suppose p ≡ 3 (mod 4). We know from Theorem 20 and its proof that
(
Zp if − 1 ∈ S(p)
S(p) =
R(x2 ) if − 1 6∈ S(p)
(
Zp if 7 ∈ A0
= .
R(x2 ) if 7 ∈ A1 ∪ {0}

The residue classes of p with 7 ∈ A0 are p ≡ ±1, ±3 ± 9 (mod 28), and the
 residue

7
classes of p with 7 ∈ A1 are p ≡ ±5, ±11 ± 13 (mod 28), and p = 7 has = 0
p

16
(p = 7 is the only prime in the residues class of 7 modulo 28). Eliminating the classes
that do not satisfy p ≡ 3 (mod 4), we get
(
Zp if p ≡ 3, 19, 27 (mod 28)
S(p) = ,
R(x2 ) if p ≡ 7, 11, 15, 23 (mod 28)
which indeed covers all cases modulo 28 of p ≡ 3 (mod 4).
2. Suppose p ≡ 1 (mod 4). We know from Theorem 21 and its proof that


 R(x2 ) if − 1 ∈ S(p)
S(p) = R(x4 ) if − 1 6∈ S(p), p ≡ 5 (mod 8)
R(x2 )\R(x4 ) ∪ {0} if − 1 6∈ S(p), p ≡ 1 (mod 8)

 


 R(x2 ) if 3 ∈ A0
= R(x4 ) if 3 ∈ A1 , p ≡ 5 (mod 8)
R(x2 )\R(x4 ) ∪ {0} if 3 ∈ A1 , p ≡ 1 (mod 8)

 

The residue classes of p with 3 ∈ A0 are p ≡ ±1 (mod 12), and the residue classes of
p with 3 ∈ A1 are p ≡ ±3, ±5 (mod 12). Eliminating the classes that do not satisfy
p ≡ 1 (mod 4), we get 3 ∈ A0 if and only if p ≡ 1 (mod 12), and 3 ∈ A1 if and only if
p ≡ 5, 9 (mod 12). But we need to do casework on primes congruent to 5 or 1 modulo
8, so we scale the modulus of the primes up to 24 to get 3 ∈ A0 if and only if p ≡ 1, 13
(mod 24), and 3 ∈ A1 if and only if p ≡ 5, 9, 17, 21 (mod 24). Here, 5 and 21 reduce
to 5 modulo 8, and 9 and 17 reduce to 1 modulo 8. Therefore,


 R(x2 ) if p ≡ 1, 13 (mod 24)
S(p) = R(x4 ) if p ≡ 5, 21 (mod 24) ,
R(x2 )\R(x4 ) ∪ {0} if p ≡ 9, 17 (mod 24)

 

which indeed covers all cases modulo 24 of p ≡ 1 (mod 4).

4 Excluded Primes
For completeness, we obtain the sum of residues and the set of these sums for p = 3 and
p = 5. X X
First, we compute R3 (x4 + cx2 + e) and R5 (x4 + cx2 + e).
1. Modulo 3, A′0 = {0, 1} and A′1 = {0, 2}. Then
Ra∈A′0 (a2 + a) = {02 + 0, 12 + 1} = {0, 2},
Ra∈A′1 (a2 + a) = {02 + 0, 22 + 2} = {0},
(
X (0 + 2)c2 + 2e ≡ 2c2 + 2e if c ∈ A0
R3 (x4 + cx2 + e) ≡ .
0c2 + 1e ≡ e if c ∈ A1

17
2. Modulo 5, A′0 = {0, 1, 4} and A′1 = {0, 2, 3}. Then

Ra∈A′0 (a2 + a) = {02 + 0, 12 + 1, 42 + 4} = {0, 2},


Ra∈A′1 (a2 + a) = {02 + 0, 22 + 2, 32 + 3} = {0, 1, 2},
(
X
4 2 (0 + 2)c2 + 2e ≡ 2c2 + 2e if c ∈ A0
R5 (x + cx + e) ≡ .
(0 + 1 + 2)c2 + 3e ≡ 3c2 + 3e if c ∈ A1

Secondly, we compute S(3) and S(5).


1. By above, modulo 3,

A′0 = {0, 1},


A1 = {2},
(
X 2c2 (mod 3) if c ∈ A0
R3 (x4 + cx2 ) ≡ .
0 (mod 3) if c ∈ A1

As a result,
S(3) = {0, 2 · 12 , 0} = {0, 2}

2. Again, by above, modulo 5,

A′0 = {0, 1, 4},


A1 = {2, 3},
(
X 2c2 (mod 5) if c ∈ A0
R5 (x4 + cx2 ) ≡ .
3c2 (mod 5) if c ∈ A1

As a result,
S(5) = {0, 2 · 12 , 3 · 22 , 3 · 32 , 2 · 42 } = {0, 2}.

It does not seem to be possible to place these computations for p = 3, 5 under the same
arguments or formulations as for primes p ≥ 7.

References
[1] C. Finch-Smith, J. Harrington, and T. W. H. Wong, Sum of Distinct Polynomial Residues, Integers
23(A63) (2023)

[2] C. F. Gauss, Theoria residuorum biquadraticorum, Commentatio prima, Comment. Soc. regiae sci, Göt-
tingen, 1828.

[3] S. S. Gross, J. Harrington, and L. Minott, Sums of Polynomial Residues, Irish Math. Soc. Bull. 79
(Summer) (2017), 31-37

[4] F. Lemmermeyer, Reciprocity Laws: From Euler to Eisenstein, Springer, Berin, Germany, 2000.

[5] O. S. Stetson, Triangular residues, Amer. Math. Monthly 11(5), 106-107 (1904)

18

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy