6

Let $\left(\dfrac{a}{p}\right)$ denote the Legendre symbol and $p \geq 3$ a prime number and $A$ an integer such that $p \nmid A$. Prove that $$\sum_{X=0}^{p-1} \left(\dfrac{X^{2}+A}{p}\right)=-1 .$$

I wasn't sure how to manipulate this sum. Maybe if we show that $\left(\dfrac{X^{2}+A}{p}\right)$ can't be a quadratic residue for more than some amount of values it will help.

Batominovski
  • 50,601
Puzzled417
  • 7,146
  • 1
    See this answer by me: http://math.stackexchange.com/questions/398200/the-number-of-solutions-of-ax2by2-equiv-1-pmodp-is-p-frac-abp/398245#398245 – Sungjin Kim Aug 14 '16 at 15:27

2 Answers2

11

Fix an odd prime natural number $p$. Let $$S_p(A):=\sum_{x\in\mathbb{F}_p}\,\left(\frac{x^2+A}{p}\right)$$ for all $A\in\mathbb{F}_p^\times$, where $\mathbb{F}_p^\times$ is the group $\mathbb{F}_p\setminus\{0\}$ of units modulo $p$. Note that $$ \begin{align} S_p(A) &=\left(\frac{A}{p}\right)+\sum_{x\in\mathbb{F}_p^\times}\,\left(\frac{x^2+A}{p}\right)=\left(\frac{A}{p}\right)+\sum_{x\in\mathbb{F}_p^{\times}}\,\left(\frac{1+Ax^2}{p}\right)\left(\frac{x^{-2}}{p}\right) \\ &=\left(\frac{A}{p}\right)+\sum_{x\in\mathbb{F}_p^{\times}}\,\left(\frac{1+Ax^2}{p}\right)=\left(\frac{A}{p}\right)\,\left(1+\sum_{x\in\mathbb{F}_p^{\times}}\,\left(\frac{x^2+A^{-1}}{p}\right)\right) \\ &=\left(\frac{A}{p}\right)\left(1-\left(\frac{A^{-1}}{p}\right)+\sum_{x\in\mathbb{F}_p}\,\left(\frac{x^2+A^{-1}}{p}\right)\right)=\left(\frac{A}{p}\right)-1+\left(\frac{A}{p}\right)\,S_p\left(A^{-1}\right)\,. \end{align}$$ If $\left(\dfrac{A}{p}\right)=-1$, then we have $$S_p(A)+S_p\left(A^{-1}\right)=-2\,.\tag{1}$$

From the claim in this answer, we have $$-1=-\left(\frac{1}{p}\right)=\sum_{y\in\mathbb{F}_p}\,\left(\frac{y(y+A)}{p}\right)=\frac{1}{2}\,\sum_{x\in\mathbb{F}_p^{\times}}\,\left(\frac{x^2+A}{p}\right)+\frac{1}{2}\,\sum_{x\in\mathbb{F}_p^{\times}}\,\left(\frac{x^2+Au}{p}\right)\,,$$ where $u$ is an arbitrary quadratic nonresidue modulo $p$. Hence, $$S_p(A)+S_p(Au)=-2\,.\tag{2}$$

If $\left(\dfrac{A}{p}\right)=-1$, then $(2)$ with $u:=A^{-1}$ yields $$S_p(A)+S_p(1)=-2\,.\tag{3}$$ Comparing $(3)$ with $(1)$, we have $S_p\left(A^{-1}\right)=S_p(1)$. However, this is true for all $A$ with $\left(\dfrac{A}{p}\right)=-1$, whence $S_p(A)=S_p(1)$. Consequently, $S_p(A)=-1$.

Now, if $\left(\dfrac{A}{p}\right)=+1$, then we know from the paragraph above that $S_p(Au)=-1$. Ergo, $S_p(A)=-1$ as well.

In general, let $p$ be an odd prime natural number and $a,b,c\in\mathbb{F}_p$. We have $$\sum_{x\in\mathbb{F}_p}\,\left(\dfrac{ax^2+bx+c}{p}\right)=\begin{cases} p\,\left(\dfrac{c}{p}\right)&\mbox{if }a=0\mbox{ and }b=0\,,\\ 0&\mbox{if }a=0\mbox{ and }b\neq0\,,\\ (p-1)\,\left(\dfrac{a}{p}\right)&\mbox{if }a\neq 0\mbox{ and }b^2-4ac=0\,,\\ -\left(\dfrac{a}{p}\right)&\mbox{if }a\neq 0\mbox{ and }b^2-4ac\neq 0\,.\\ \end{cases}$$

Batominovski
  • 50,601
  • 4
    Another approach to the "In general" identity: Let $L = \sum\limits_{x \in \mathbb{F}p} \left(\dfrac{ax^2+bx+c}{p}\right)$. Then, $L \in \left{-p,-p+1,\ldots,p\right}$. But recall that $\left(\dfrac{u}{p}\right) \equiv u^{\left(p-1\right)/2} \mod p$ for all integers $u$. Thus, $L \equiv \sum\limits{x \in \mathbb{F}_p} \left(ax^2+bx+c\right)^{\left(p-1\right)/2} \mod p$. But $\left(ax^2+bx+c\right)^{\left(p-1\right)/2}$ is a polynomial of degree $\leq p-1$ in $x$, and its $x^{p-1}$-coefficient is $a^{\left(p-1\right)/2}$. Hence, ... – darij grinberg Aug 08 '19 at 08:19
  • 4
    ... we know that $L$ is congruent (mod $p$) to the sum of all values of this polynomial over $\mathbb{F}p$. However, it is known that such a sum is always congruent to minus the $x^{p-1}$-coefficient (since $\sum{x \in \mathbb{F}p} x^i = 0$ for all $i < p-1$ and since $\sum{x \in \mathbb{F}_p} x^{p-1} = -1$). Thus, $L \equiv - a^{\left(p-1\right)/2} \equiv - \left(\dfrac{a}{p}\right) \mod p$. Combining this with $L \in \left{-p,-p+1,\ldots,p\right}$, we have thus narrowed down the value of $L$ to two or three options. But we also know the parity of $L$: If $b^2 - 4ac \neq 0$, then ... – darij grinberg Aug 08 '19 at 08:22
  • 4
    ... (assuming $a \neq 0$) either none or two of the addends of the sum $L = \sum\limits_{x \in \mathbb{F}_p} \left(\dfrac{ax^2+bx+c}{p}\right)$ are zero (because the discriminant of a quadratic polynomial tells us whether it has exactly one root), and thus $L$ is odd (since all remaining addends in this sum are odd); otherwise, exactly one of these addends is zero, and thus $L$ is even. In either case, this uniquely determines the value of $L$ when $a \neq 0$. The case $a = 0$ is easy and can be handled separately. – darij grinberg Aug 08 '19 at 08:30
0

The argument below is outlined in exercises 5.6-5.8 on p.63 of Ireland & Rosen's A Classical Introduction to Modern Number Theory 2nd Ed.

  1. Show that the number of solutions to $x^2-y^2\equiv a(p)$ is given by $$\sum_{y=0}^{p-1}(1+((y^2+a)/p)).$$
  2. By calculating directly show that the number of solutions to $x^2-y^2\equiv a(p)$ is $p-1$ if $p\not\mid a$ and $2p-1$ if $p\mid a$. ($\textit{Hint}$: Use the change of variables $u=x+y,v=x-y$.)
  3. Combining the results of Exercises 6 and 7 show that $$\sum_{y=0}^{p-1}\left(\frac{y^2+a}{p}\right)=\begin{cases}-1,\text{if }p\not\mid a,\\p-1,\text{ if }p\mid a.\end{cases}$$

If $y$ is such that $y^2+a\equiv0(p)$, then $x^2-y^2\equiv a(p)$ has exactly one solution, namely $x\equiv0(p)$. If $y$ is such that $y^2+a\not\equiv0(p)$, then $x^2-y^2\equiv a(p)$ either has no solutions or if it has a solution, then it has exactly two solutions. In any case, for each $y$, the number of solutions to $x^2-y^2\equiv a(p)$ is $1+((y^2+a)/p)$. So the number of solutions to $x^2-y^2\equiv a(p)$ is given by $\sum_{y=0}^{p-1}(1+((y^2+a)/p))$.

Let $u=x+y$ and $v=x-y$. Then $x^2-y^2\equiv a(p)$ is equivalent to $uv\equiv a(p)$. Suppose $p\not\mid a$. Then we must have $u,v\not\equiv0(p)$. So for each $u$, $v$ is uniquely determined by $v\equiv u^{-1}a(p)$. There are $p-1$ such pairs of $u,v$. Suppose $p\mid a$. If $u\equiv0(p)$, then $v$ can be any of the $p$ elements. But if $u\not\equiv0(p)$, then we must have $v\equiv u^{-1}0\equiv0(p)$. So there are $p+(p-1)=2p-1$ such pairs of $u,v$. Since each pair of $x,y$ is uniquely determine by a pair of $u,v$ and vice versa, we see that the number of solutions to $x^2-y^2\equiv a(p)$ is $p-1$ if $p\not\mid a$ and $2p-1$ if $p\mid a$.

Now, $\sum_{y=0}^{p-1}(1+((y^2+a)/p))=p+\sum_{y=0}^{p-1}(y^2+a)/p)$. If $p\not\mid a$, then $\sum_{y=0}^{p-1}(1+((y^2+a)/p))=p-1$, so $\sum_{y=0}^{p-1}(y^2+a)/p)=-1$. If $p\mid a$, then $\sum_{y=0}^{p-1}(1+((y^2+a)/p))=2p-1$, so $\sum_{y=0}^{p-1}(y^2+a)/p)=p-1$. Hence $\sum_{y=0}^{p-1}\left(\frac{y^2+a}{p}\right)=\begin{cases}-1,\text{if }p\not\mid a,\\p-1,\text{ if }p\mid a.\end{cases}$

We may use the above result to derive a formula for the more general sum $\sum_{x\in\Bbb F_p}\left(\frac{ax^2+bx+c}{p}\right)$, where $p$ is an odd prime and $a,b,c\in\Bbb F_p$.

If $a=0,b=0$, then $\sum_{x\in\Bbb F_p}\left(\frac{ax^2+bx+c}{p}\right)=\sum_{x\in\Bbb F_p}\left(\frac{c}{p}\right)=p\left(\frac{c}{p}\right)$.

If $a=0,b\neq0$, then $\sum_{x\in\Bbb F_p}\left(\frac{ax^2+bx+c}{p}\right)=\sum_{x\in\Bbb F_p}\left(\frac{bx+c}{p}\right)=0$, as explained here.

Suppose $a\neq0$. Then \begin{align*} \sum_{x\in\Bbb F_p}\left(\frac{ax^2+bx+c}{p}\right)&=\left(\frac{4a}{p}\right)\sum_{x\in\Bbb F_p}\left(\frac{4a^2x^2+4abx+4ac}{p}\right)\\ &=\left(\frac{a}{p}\right)\sum_{x\in\Bbb F_p}\left(\frac{(2ax+b)^2-(b^2-4ac)}{p}\right)\\&=\left(\frac{a}{p}\right)\sum_{y\in\Bbb F_p}\left(\frac{y^2-(b^2-4ac)}{p}\right). \end{align*}

If $b^2-4ac=0$, then \begin{align*}\sum_{x\in\Bbb F_p}\left(\frac{ax^2+bx+c}{p}\right) &=\left(\frac{a}{p}\right)\sum_{y\in\Bbb F_p}\left(\frac{y^2}{p}\right)\\ &=(p-1)\left(\frac{a}{p}\right), \end{align*} where the last equality follows since $\left(\frac{y^2}{p}\right)=0$ for $y=0$ and $\left(\frac{y^2}{p}\right)=1$ otherwise. Alternatively, one could apply directly the result in the beginning.

If $b^2-4ac\neq0$, then \begin{align*}\sum_{x\in\Bbb F_p}\left(\frac{ax^2+bx+c}{p}\right) &=\left(\frac{a}{p}\right)\sum_{y\in\Bbb F_p}\left(\frac{y^2-(b^2-4ac)}{p}\right)\\ &=-\left(\frac{a}{p}\right), \end{align*} where the last equality follows from the result in the beginning.

19021605
  • 1,412