Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I prove the formula $\newcommand{\jaco}[2]{\left(\frac{#1}{#2}\right)}\sum\limits_{a=1}^{p-2} \jaco{a(a+1)}p = -1$ where a varies from 1 to p-2 and p is a prime

I got as far as $\jaco{p-a}p = \jaco{-1}p \jaco ap$ so I can reduce the sum but that does not seem of much help.

share|cite|improve this question
I've tried to rewrite your post using TeX (for better readability), please, check whether I did not unintentionally changes anything. For some basic information about writing math at this site see e.g. here, here, here and here. – Martin Sleziak Mar 18 '13 at 11:50
up vote 8 down vote accepted

Note that for $1 \leq a \leq p-2$, $a$ has a unique inverse between $1$ and $p-2$. $$\sum_{a=1}^{p-2}{\left(\frac{a(a+1)}{p}\right)}=\sum_{a=1}^{p-2}{\left(\frac{(\frac{a+1}{a})}{p}\right)}=\sum_{a=1}^{p-2}{\left(\frac{1+a^{-1}}{p}\right)}=\sum_{a=1}^{p-2}{\left(\frac{1+a}{p}\right)}=\sum_{a=2}^{p-1}{\left(\frac{a}{p}\right)}=-1$$

The first equality holds since $\left(\frac{a(a+1)}{p}\right)=\left(\frac{(\frac{a+1}{a})}{p}\right)\left(\frac{a^2}{p}\right)=\left(\frac{(\frac{a+1}{a})}{p}\right)$.

The last equality holds because $\sum\limits_{a=1}^{p-1}{\left(\frac{a}{p}\right)}=0$ and $\left(\frac{1}{p}\right)=1$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.