arXiv:1903.01098v4 [math.NT] 2 Apr 2021 ooae’ hoe 1]sae htteLgnr ybl( symbol Legendre the that states [10] Theorem Zolotarev’s aymathematicians. many ae h inof sign the paper lsia oi nnme hoyadcmiaois nparticular, In combinatorics. and theory number S in topic classical a ftepruainof permutation the of 11571162). ie u 6 netgtdmn emtto rbesivligquadra involving problems over reciprocity. permutation polynomial quadratic many permutation of investigated law [6] the Sun of line, proof new a obtained Zolotarev ayt e that see to easy n h uhr[]dtrie h ino permutation of sign the determined [8] author the and oevr .Dk n .Hpis[]etne hstpct narbit an to topic this extended [2] Hopkins K. and Duke W. Moreover, UDAI EIUSADRLTDPERMUTATIONS RELATED AND RESIDUES QUADRATIC stefiiefield finite the is o ntne when instance, For Let upre yteNtoa aua cec onaino hn (G China of Foundation Science Natural National the by Supported 2010 Keywords S ahmtc ujc Classification Subject Mathematics n eemn h sign the determine and Abstract. inof sign eoeteuiu integer unique the denote emtto of permutation a nti ae esuysm emttosivligqartcresidu quadratic involving permutations some study modulo we paper this In where ( p eafiiest n let and set, finite a be − udai eius emttos rmtv ot,ccooi fie cyclotomic roots, primitive permutations, residues, quadratic . 1) f / g 2 σ ( p x ≤ 0 ∈ o ntne ecnie h olwn he sequences. three following the consider we instance, For . , over ) 1 f p Z τ when ( − Let x sapiiiero modulo root primitive a is sdntdb sgn( by denoted is F = ) r l udai eiusmodulo residues quadratic all are 1 A p p j f F p with Z ea d rm.Frany For prime. odd an be n ecl hspermutation this call we and ( x p ≡ x A A A h rprisof properties the , /p k = ) 1 2 0 md4.I hspprw ietesg of sign the give we paper this In 4). (mod 3 sapruainplnma over polynomial permutation a is Z σ : : : > p 1. 0 g a 1 x , 2 2 1 2 nue ymlilcto by multiplication by induced ax F A-IN WU HAI-LIANG with , , , Introduction when p τ 2 rm and prime 2 g a When . 2 4 2 with , , eapruainon permutation a be , − · · · · · · · · · p/ p rmr 11;Scnay0A5 11R18. 05A05, Secondary 11A15; Primary . 1 τ ≡ 2 , , , a .Ivsiaigtepoete of properties the Investigating ). p/ < x < (( g a md4). (mod 1 ∈ k p ( p p − − ∈ Z − 1 p 1) , τ 1) Z τ / n 1 and n gcd( and 2 aebe tde epyby deeply studied been have + / , sidcdb permutation a by induced is p and 2 2) ai integer -adic n gcd( and σ 2 i,j , p ≤ Obviously . u bandthe obtained Sun . x a − ,p a, 1 a S a < τ iiil by divisible hogotthis Throughout . ,tefamous the 1, = ) ,p k, nue by induced 2 a F a < elet we − a p p sn this, Using . A .YWang L.-Y . stesign the is ) · · · )=1 tis it 1, = 1) i σ sa is 0 es < p lds. , a 1 atNo. rant . nthis In when f rary ( τ x tic is ). 2 HAI-LIANG WU

finite group. They also generalized the law of quadratic reciprocity on finite groups. Given an odd prime p. Throughout this paper, for any integer a we let a denote the unique integer x with p/2

A : 12, 22, , ((p 1)/2)2, 0 ··· − A : a , a , , a , 1 1 2 ··· (p−1)/2 A : g2, g4, , gp−1, 2 ··· where g Z is a primitive root modulo p. Clearly A is a permutation of A ∈ i j and we call this permutation σ . As mentioned before, when p 3 (mod 4), i,j ≡ Sun proved that

1 if p 3 (mod 8), sgn(σ )= ≡ 0,1 ( 1)(h(−p)+1)/2 if p 7 (mod 8), ( − ≡ where h( p) is the class number of Q(√ p). − − In this paper, we study the above permutations. We first introduce some notations. Let p 1 (mod 4) be a prime. Let εp =(up + vp√p)/2 > 1 and ≡ h(p) be the fundamental unit and the class number of Q(√p) respectively. And we let h( 4p) denote the class number of Q(√ p). We also define − −

sp := k 1≤k≤(p−1)/2 kY ( p )=−1 and let x y r∗ := # (x, y):1 x, y (p 1)/2, x+y (p 1)/2, = =1 , p { ≤ ≤ − ≤ − p p }     where #S denotes the cardinality of a finite set S. Now we are in the position to state our first theorem. QUADRATIC RESIDUES AND RELATED PERMUTATIONS 3

Theorem 1.1. Let p 1 (mod 4) be a prime. Then ≡ (p−1)/4 ((h(p)+2)(p−1)+2h(−4p))/8+r∗ s up ( 1) p if p 1 (mod 8), p · − ≡ sgn(σ0,1)=   1 (p+3)/4 ((h(p)+2)(p+3)+2h(−4p)−4)/8+r∗  s up ( 1) p if p 5 (mod 8). 2 p · − ≡  Now we turn to the permutation σ0,2. For convenience, we write p =2n+1 for some positive integer n.

Theorem 1.2. Let p 1 (mod 4) be a prime, and let g Z be a primitive ≡ ∈ root modulo p Then 1 sgn(σ )= nn/2u g(p−1)(3n2−n−2)/8 ( 1)(h(p)+1)/2. 0,2 2 p · − In particular, when p 5 (mod 8), sgn(σ ) is independent on the choice ≡ 0,2 of g and we have 1 sgn(σ )= nn/2u ( 1)(2h(p)+n)/4. 0,2 2 p · − As an application of Theorem 1.2, we can calculate some determinants concerning Dirichlet characters modulo p. Let p be an odd prime and let g be a primitive root modulo p. Let Fp denote the group of Dirichlet characters modulo p and let χ be a generator of Fp. We consider the following matrix: c 2 2 p−1 2 χ(1 ) χ(2 )c χ(( 2 ) ) 2 2 2 2 ··· 2 p−1 2 χ (1 ) χ (2 ) χ (( 2 ) ) Mp =  . . ···. .  ......  p−1 2 p−1 2 p−1 p−1 2  χ 2 (1 ) χ 2 (2 ) χ 2 (( ) )  ··· 2    We have the following result.

Corollary 1.1. Let p 5 (mod 8) be a prime. Then ≡ 1 det(M )= nn/2( 1)(n+2)/4 nn/2u ( 1)(2h(p)+n)/4 Z. p − × 2 p · − ∈   Remark 1.1. The signs of permutations have deep connections with the calculations of determinants. The readers may see [7] for more examples.

The proofs of Theorem 1.1–1.2 and Corollary 1.1 will be given in the next section. 4 HAI-LIANG WU

2. Proofs of Theorem 1.1–1.2 and Corollary 1.1 Let p be an odd prime. Throughout this section, we set p =2n + 1. We begin with the following lemma (cf. [6, (1.5)]).

Lemma 2.1. n! (mod p) if p 1 (mod 4), (j2 i2) − ≡ − ≡ 1 (mod p) if p 3 (mod 4). 1≤i 3 is a prime and p 3 (mod 4) then ≡ p 1 h(−p)+1 − ! ( 1) 2 (mod p), 2 ≡ −   where h( p) is the class number of Q(√ p). Later S. Chowla [1] extended − − Mordell’s result and obtained the following result.

Lemma 2.2. Let p 1 (mod 4) be a prime. Then we have ≡ p 1 ( 1)(h(p)+1)/2u − ! − p (mod p), 2 ≡ 2   where h(p) and up are defined as in Theorem 1.1.

In 1982 K. S. Williams and J. D. Currie [9] obtained the following result.

Lemma 2.3. Let p 1 (mod 4) be a prime. We have ≡ (p−1)/8+h(−4p)/4 p−1 ( 1) (mod p) if p 1 (mod 8), 2 4 − ≡ ≡ ( 1)(p−5)/8+(h(−4p)−2))/4 ( p−1 )! (mod p) if p 5 (mod 8). ( − · 2 ≡ Proof of Theorem 1.1. Let p 1 (mod 4) be a prime. It follows from ≡ definition that j2 i2 sgn(σ )= − . 0,1 a a 1≤i

A++ (a a )= k k , j − i 1≤i

P A++ p−1 −1 (1+( k )) (a a ) ( 1) 1≤k≤n p−k k 4 k 2 p (mod p). j − i ≡ − × 1≤i

p−1 4 p−1 −1 (1+( k )) p 1 −1 k 4 k 2 p = − ! k 2 1≤k≤n   1≤k≤n Y Yk ( p )=1 p−5 p 1 4 = − ! s . 2 × p   Hence we get p−5 4 ∗ p 1 (a a ) ( 1)rp − ! s (mod p). (2.2) j − i ≡ − · 2 · p 1≤i

Lemma 2.4. Let p> 3 be a prime. We have the identity

2 (ζ2j ζ2i)= nn/2e(3n −n−2)πi/4. − 1≤i

Proof. Let f(ζ)= (ζ2j ζ2i). Then 1≤i

(ζ2j ζ2i)= 1 det(N ). − − · p,g 1≤i

Proof of Theorem 1.2. Let p 1 (mod 4) be a prime, and let g Z be a ≡ ∈ primitive root modulo p. By definition we have j2 i2 sgn(σ0,2)= − . 2j 2i 1≤i 2 and p p−1 − ≡ 1 (mod p 1), it is known that p totally splits in Q(ζ). Hence by Kummer’s − Theorem (cf. [5, p.47 Proposition 8.3]) we know that Φp−1(x) (mod pZ[x]) splits in Z/pZ[x]. And the set of primitive (p 1)-th roots of unity of Q(ζ) − maps bijectively onto the set of primitive (p 1)-th roots of unity of Z/pZ. − Hence we have

Φ (x) (x gk) (mod pZ[x]). p−1 ≡ − 1≤k≤p−1 gcd(k,pY−1)=1 Now let f(x)= (x2j x2i). We may write 1≤i

Q f(x)= g(x)Φp−1(x)+ h(x), with g(x), h(x) Z[x] and deg(h(x)) < deg(Φ (x)). By Lemma 2.4 we ∈ p−1 know that 2 n (3n2−n−2)πi/4 n p−1 3n −n−2 h(ζ)= n 2 e = n 2 ζ 4 2 .

n As p 1 (mod 4), we have n 2 Z. Thus by Galois theory for each primitive ≡ ∈ (p 1)-th root of unity ζ we have − p−1 2 n p−1 3n −n−2 h(ζ )= n 2 ζ 4 2 . p−1 · p−1 Let n p−1 3n2−n−2 t(x)= n 2 x 4 2 Z[x]. · ∈ We obtain Φ (x) h(x) t(x). p−1 | − Hence we have

2 2j 2i n p−1 3n −n−2 (g g )= f(g) h(g) t(g) n 2 g 4 2 (mod p). (2.4) − ≡ ≡ ≡ · 1≤i

In particular, in view of the above, when p 5 (mod 8), for each primitive ≡ (p 1)-th root of unity ζ we have − p−1 n n−2 h(ζ )= n 2 ( 1) 4 . p−1 · − n n−2 Hence h(x) is the constant n 2 ( 1) 4 . The desired result follows from · − (2.3) and (2.4). 

Proof of Corollary 1.1. Let Mp be as in Corollary 1.1, and let Np,g be as in Remark 2.1. When p 5 (mod 8), it is easy to see that det(N ) is ≡ p,g independent on the choice of g. Then det(M ) = sgn(σ ) det(N ). p 0,2 · p,g Our desired result follows from Lemma 2.4 and Theorem 1.2.  Acknowledgments We are exceedingly thankful for the careful reading and indispensable suggestions of the anonymous referees. We also thank Prof. Z.-W Sun and Prof. Hao Pan for their help suggestions. This research was supported by the National Natural Science Foundation of China (Grant No. 11571162).

References [1] S. Chowla, On the class number of real quadratic field, Proc. Natl. Acad. Sci. USA, 47(1961), 878. [2] W. Duke and K. Hopkins, Quadratic reciprocity in a finite group, Amer. Math. Monthly 112(2005), 251–256. [3] K. Ireland and M. Rosen, A Classical Introduction to Modern (Graduate Texts in Math.; 84), 2nd ed., Springer, New York, 1990. [4] L. J. Mordell, The congruence ((p 1)/2)! 1 (mod p), Amer. Math. Monthly 68 (1961), 145–146. − ≡± [5] J. Neukirch, , Springer-Verlag Berlin Heidelberg, 1999. [6] Z.-W Sun, Quadratic residues and related permutations and identities, Finite Fields Appl. 59(2019), 246–283. [7] Z.-W Sun, On Some Determinants with entries, Finite Fields Appl. 56(2019), 285–307. [8] L.-Y Wang and H.-L Wu, Applications of Lerch’s theorem and permutations con- cerning quadratic residues, prepringt, arXiv:1810.03006v4, 2018. [9] K. S. Williams and J. D. Currie, Class number and biquadratic reciprocity, Canad. J. Math. 34(1982),969–988. [10] G. Zolotarev, Nouvelle d´eonstration de la loi de r´eciprocit´ede Legendre, Nouvelles Ann. Math. 11(1872), 354–362.

(Hai-Liang Wu) Department of Mathematics, Nanjing University, Nan- jing 210093, People’s Republic of China Email address: [email protected]