# Determining the sign of the Gauss sum under the change of variable $x\mapsto 1+u$.

I'm having a hard time deciphering some old notes. The aim is to determine the sign of the Gauss sum. Paraphrasing:

Take the polynomial $$\sum_{i=1}^{p-1}\left(\frac{i}{p}\right)x^i-\sigma\prod_{j=1}^{(p-1)/2}(x^{2j-1}-x^{p-2j+1})$$ where $\sigma=\pm 1$. We know $x^p-1$ divides this polynomial, so write it as $(x^p-1)f(x)$. Changing variables to $1+u$, we obtain $$\sum_{i=1}^{p-1}\left(\frac{i}{p}\right)(1+u)^i-\sigma\prod_{j=1}^{(p-1)/2}((1+u)^{2j-1}-(1+u)^{p-2j+1})=((1+u)^p-1)f(1+u).$$

Comparing coefficients, reducing modulo $p$, and applying Wilson's theorem shows $\sigma=1$.

I should mention that $\left(\frac{i}{p}\right)$stands for the Legendre symbol. The last sentence skips too many details for me to reproduce. Can anybody show in a bit more detail how to conclude $\sigma=1$? I appreciate it, thanks kindly.

-

Let $A(x) = \sum_{i=1}^{p-1}\left(\frac{i}{p}\right)x^i$ and $B(x) = \prod_{j=1}^{(p-1)/2}(x^{2j-1}-x^{p-2j+1})$, so that $$A(x) - \sigma B(x) = (x^p - 1) f(x).$$
Observe that in $\mathbb{F}_p$, $x^p - 1 = (x-1)^p$, and for $j=1,2,\ldots,(p-1)/2$, $1$ is a simple root of $b_j(x) = x^{2j-1} - x^{p-2j+1}$ (i.e. $x-1\mid b_j(x)$ but $(x-1)^2\nmid b_j(x)$). Thus $$(x-1)^{(p-1)/2} \| B(x) \implies (x-1)^{(p-1)/2} \| A(x).$$
None of this is strictly necessary, but it does tell us that in order to find $\sigma$, it suffices to look at the $(p-1)/2$th derivative evaluated at $1$, or equivalently, the coefficient of $u^{(p-1)/2}$ under the substitution $x\mapsto 1+u$.
Clearly $$[u^{(p-1)/2}]((1+u)^p - 1) f(1+u) \equiv [u^{(p-1)/2}]u^p f(1+u) = 0 \pmod{p}$$ and $$[u^{(p-1)/2}] B(1+u) = \prod_{j=1}^{(p-1)/2} (2j-1-p+2j-1).$$ To compute $[u^{(p-1)/2}]A(1+u)$, recall that $\sum_{i=1}^{p-1} i^r$ is congruent to $-1\pmod{p}$ when $p-1\mid r$ and $0\pmod{p}$ otherwise, and for $i=1,2,\ldots,p-1$, $\left(\frac{i}{p}\right)\equiv i^{(p-1)/2}\pmod{p}$. (Actually, by taking derivatives, we can directly use these two facts to prove that $(x-1)^{(p-1)/2} \| A(x)$.) Hence $$[u^{(p-1)/2}]A(1+u) \equiv \sum_{i=1}^{p-1} i^{(p-1)/2}\binom{i}{(p-1)/2} \equiv \frac{-1}{((p-1)/2)!} \pmod{p}.$$ It immediately follows that $$0 \equiv -1 - \sigma((p-1)/2)!\prod_{j=1}^{(p-1)/2}(4j-2) = -1 - \sigma\prod_{j=1}^{(p-1)/2}(2j)\prod_{j=1}^{(p-1)/2}(2j-1) \equiv -1+\sigma \pmod{p},$$ where we use Wilson's theorem in the last step. Thus $\sigma \equiv 1 \pmod{p}\implies \sigma = 1$, as desired.