The sum $\sum_{r=1}^{p-1} r(r|p)$ when $p$ is an odd prime of the form $4k+3$, $k\geq 1$.

54 Views Asked by At

In the book Apostol Analytic Number Theory, $(r|p)$ denotes the Legendre Symbol. The exercise tell us to prove when $p\equiv 1\pmod 4$, $$\sum_{r=1}^{p-1}r(r|p)=0.$$ I can solve this quickly, but I wonder what if $p\equiv 3\pmod 4$? Either this book or the number theory textbook by Rosen both didn't include this question. This question should be easily thought but not easily calculated. For prime $p$ of the form $p\equiv 3\pmod 4$, I let $$f(p)=\sum_{r=1}^{p-1}r(r|p)$$ and I get these values: \begin{align*} f(7)&=-7\\ f(11)&=-11\\ f(19)&=-19\\ f(23)&=-3(23)\\ f(31)&=-3(31)\\ f(43)&=-43\\ f(47)&=-5(47)\\ f(59)&=-3(59)\\ f(67)&=-67\\ f(71)&=-7(71)\\ f(79)&=-5(79)\\ f(83)&=-3(83)\\ f(103)&=-5(103)\\ f(107)&=-3(107)\\ f(127)&=-5(127)\\ f(131)&=-5(131)\\ f(139)&=-3(139)\\ f(151)&=-7(151)\\ f(163)&=-163\\ f(167)&=-11(167) \end{align*}

How can I observe the pattern?