# sum of the product of consecutive legendre symbols is -1

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.

-
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

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$.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 1, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9951462149620056, "perplexity": 200.82466879106187}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2016-18/segments/1461861727712.42/warc/CC-MAIN-20160428164207-00067-ip-10-239-7-51.ec2.internal.warc.gz"}