Exercise 5.29

Let ( RR ) be the number of pairs ( n , n + 1 ) in the set 1 , 2 , 3 , … , p − 1 such that n and n + 1 are both quadratic residues modulo p . Let ( NR ) be the number of pairs ( n , n + 1 ) in the set 1 , 2 , 3 , … , p − 1 such that n is a quadratic nonresidue and n + 1 is a quadratic residue. Similarly, define ( RN ) and ( NN ) . Determine the sums ( RR ) + ( RN ) , ( NR ) + ( NN ) , ( RR ) + ( NR ) , and ( RN ) + ( NN ) .

Answers

Proof. Let E = [ [ 1 , p − 2 ] ] . Then | E | = p − 2 .

Write RR the set of integers n ∈ E such that n and n + 1 are both a quadratic residues, and ( RR ) = | RR | its cardinality, and similar definitions for RN , NR , NN .

As E = RR ∪ RN ∪ NR ∪ NN (disjoint union),

( RR ) + ( RN ) + ( NR ) + ( NN ) = | E | = p − 2 .

∙ The union RR ∪ RN is the set of n ∈ E such that n is a quadratic residue. Its cardinality is the number of quadratic residues in [ [ 1 , p − 2 ] ] , that is the number of quadratic residues in [ [ 1 , p − 1 ] ] , minus s , where s = 1 if p − 1 ≡ − 1 is a residue, s = 0 otherwise. Since ( − 1 p ) = ( − 1 ) ( p − 1 ) ∕ 2 , we obtain s = 1 + ( − 1 ) p − 1 2 2 , and the total number of quadratic residues is ( p − 1 ) ∕ 2 , thus

( RR ) + ( RN ) = p − 1 2 − s = p − 1 2 − 1 + ( − 1 ) p − 1 2 2 = 1 2 ( p − 2 − ( − 1 ) p − 1 2 ) .

∙ Similarly, ( NR ) + ( NN ) is the number of quadratic nonresidues in [ [ 1 , p − 1 ] ] , minus t , where t = 1 if p − 1 is a quadratic nonresidue, t = 0 otherwise : t = 1 − ( − 1 ) p − 1 2 2 , so

( NR ) + ( NN ) = 1 2 ( p − 2 + ( − 1 ) p − 1 2 )

(the sum of these two results is indeed p − 2 = | E | ).

∙ Since 1 is a residue, ( RR ) + ( NR ) is the number of residues in [ [ 1 , p − 1 ] ] , minus 1 :

( RR ) + ( NR ) = p − 1 2 − 1 .

∙ ( RN ) + ( NN ) is the number of nonresidues in [ 2 , p − 1 ] , equal to the number of residues in [ [ 1 , p − 1 ] ] :

( RN ) + ( NN ) = p − 1 2 .

□

User profile picture
2022-07-19 00:00
Comments