Quadratic residues and related permutations
Hai-Liang Wu
TL;DR
This work investigates the signs of permutations of quadratic residues modulo an odd prime $p$, focusing on the induced permutations $\sigma_{i,j}$ between three natural residue-based sequences. It advances Sun's results by determining $\operatorname{sgn}(\sigma_{0,1})$ for primes with $p \equiv 1 \pmod{4}$ (with explicit formulas in terms of class numbers $h(p)$, $h(-4p)$, the fundamental unit $\varepsilon_p$, $u_p$, and related invariants) and by computing $\operatorname{sgn}(\sigma_{0,2})$ under the same condition, using cyclotomic-field techniques. The proofs combine Mordell/Chowla-type lemmas for products of quadratic-difference terms, detailed combinatorial counts like $A_k^{++}$ and $r_p^*$, and Galois-theoretic analyses of cyclotomic polynomials to yield precise sign expressions; a determinant formula for a matrix $M_p$ built from Dirichlet characters is also derived when $p \equiv 5 \pmod{8}$. The results deepen connections between permutation signs of quadratic residues and deep arithmetic invariants, with concrete consequences for associated Dirichlet-character determinants.
Abstract
Let $p$ be an odd prime. For any $p$-adic integer $a$ we let $\overline{a}$ denote the unique integer $x$ with $-p/2<x<p/2$ and $x-a$ divisible by $p$. In this paper we study some permutations involving quadratic residues modulo $p$. For instance, we consider the following three sequences. \begin{align*} &A_0: \overline{1^2},\ \overline{2^2},\ \cdots,\ \overline{((p-1)/2)^2},\\ &A_1: \overline{a_1},\ \overline{a_2},\ \cdots,\ \overline{a_{(p-1)/2}},\\ &A_2: \overline{g^2},\ \overline{g^4},\ \cdots,\ \overline{g^{p-1}}, \end{align*} where $g\in\Z$ is a primitive root modulo $p$ and $1\le a_1<a_2<\cdots<a_{(p-1)/2}\le p-1$ are all quadratic residues modulo $p$. Obviously $A_i$ is a permutation of $A_j$ and we call this permutation $σ_{i,j}$. Sun obtained the sign of $σ_{0,1}$ when $p\equiv 3\pmod4$. In this paper we give the sign of $σ_{0,1}$ and determine the sign $σ_{0,2}$ when $p\equiv 1\pmod 4$.
