2

I have a question concerning the sum of quadratic residues in $[-p',p']$ for $p=8k+7$ where $p'=(p-1)/2$. The answer seems to be $0$ for small cases: $$p=7:1+2-3=0$$ $$p=23: 1+4+9+2+3+6+8-7-10-5-11=0$$ None of the number theory books I have read (Niven, Zuckerman and Vinogradov) have really considered this sum except for proving it is $0 \pmod p$ which is not that hard. Of course, there is a big chance of this hypothesis not being true so please provide a counterexample if you find one, or even better, a proof if you manage to prove this.

Haran
  • 11,978
  • 1
  • 19
  • 56
  • Checked up to all primes less than $10000$. They all follow your hypothesis. – Haran Sep 16 '18 at 10:22
  • In the case of $p$ prime, I think that https://arxiv.org/pdf/1512.00896.pdf provides a proof - using that $\sum Q = np$, and that there are $n$ quadratic residues in $[-p',0]$, where $n$ is the number of quadratic non-residues in $[0,p']$. – Matt Sep 16 '18 at 10:22
  • $p$ is prime. $39, 55, 63, 95, 111, 175$ are exceptions. I have deleted my post above. – Haran Sep 16 '18 at 10:46
  • Yes, and in that case the answer is provided in the link above. I am happy to summarize what's in that note in an answer, but I'll wait to see what OP says. – Matt Sep 16 '18 at 10:50
  • Your above comment states that there are the same number of residues in $[-p',0]$ and in $[0,p']$, which is $n$. How is that true? – Haran Sep 16 '18 at 10:59
  • My comment says that there are $n$ quadratic non-residues in $[0,p']$. It follows that there are $n$ quadratic residues in $[p',p]$ (because $p \equiv 3 \mod{4}$), and so $n$ quadratic residues in $[-p',0]$. – Matt Sep 16 '18 at 11:03
  • Oh, ok sorry, my bad. – Haran Sep 16 '18 at 11:34

1 Answers1

2

The result is proven here, which I summarize below.

Suppose that $p = 8k + 7$. Let $Q$ be the set of quadratic residues in $[0,p]$, and $Q'$ the set of quadratic residues in $[-p',p']$.

Since $p \equiv 3 \pmod{4}$, we have that $-1$ is not a quadratic residue (this is proven here, for example). In particular, in the case when $p \equiv 3 \mod{4}$, we have that the negative (modulo $p$) of any residue is a non-residue, and the negative of any non-residue is a residue.

Let $n$ be the number of non-residues in $[0,p']$. It follows that there are $n$ residues in $[p',p]$. In particular, we have that $\sum Q' = \sum Q - np$.

Now it suffices to show that $\sum Q = np$.

Let $\sigma:\mathbb{Z}_p \rightarrow \mathbb{Z}_p, x \mapsto 2x$. Notice that for $x \in [0,p']$, $\sigma(x) = 2x$ in $\mathbb{Z}$. For $x \in [p',p], \sigma(x) = 2x - p$ in $\mathbb{Z}$. Moreover, observe that $\sigma$ fixes $Q$, since $p \equiv 7 \mod{8}$. We hence have

$\sum Q = \sum \sigma(Q) = \sum_{x \in [0,p']} 2x + \sum_{x \in [p',p]} (2x - p) = 2\sum Q - np$.

$\implies \sum Q = np$

Matt
  • 3,446