# Why does the quadratic Gauss sum $G(a,b,c)$ evaluate to 0 when $gcd(a,c)>1$?

On the Wikipedia page for the quadratic Gauss sum it states that it will evaluate to $$0$$ in the case that $$\text{gcd}(a,c)>1$$, except when $$l|b$$.

The Gauss sum is defined as

$$G(a,b,c)=\sum_{n=0}^{c-1} e^{2\pi i\frac{an^2+bn}{c}}$$

Lets say that $$\text{gcd}(a,c)=l>1$$. Then we could write $$a=a'l$$ and $$c=c'l$$ such that

$$G(a,b,c)=\sum_{n=0}^{c-1} e^{2\pi i\frac{a'ln^2+bn}{c'l}}=\sum_{n=0}^{c-1} e^{2\pi i\frac{a'n^2}{c'}}e^{2\pi i\frac{bn}{c'l}}$$

How can this be utilised to show that $$G(a,b,c)=0$$, except when $$l|b$$?

$$G(a,b,c) = \sum_{n=0}^{c-1} \exp\left( 2\pi i \frac{an^2+bn}{c}\right)$$; Note that the summand $$f(a, b, c; n) = \exp\left( 2\pi i \frac{an^2+bn}{c} \right)$$ satisfies $$f(a,b,c;n) = f(a,b,c;n+c)$$, so we can shift the index to have
$$G(a,b,c) = \sum_{n=0}^{c-1}\exp\left( 2\pi i \frac{a(n+r)^2+b(n+r)}{c}\right)$$ for any integer $$r$$.
Let $$a = \ell A$$ and $$c = \ell C$$; let $$r = C$$ to have $$G(a,b,c) = G(a,b,c) \cdot e^{2\pi i \frac{b}{l}}$$. If $$\ell \not \mid b$$ , $$e^{2\pi i \frac{b}{\ell}} \ne1$$ and so $$G(a,b,c) = 0$$. Here $$\ell$$ is the gcd of $$a$$ and $$c$$.
{"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": 0, "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": 25, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.994961142539978, "perplexity": 63.62985339057696}, "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-2022-40/segments/1664030337360.41/warc/CC-MAIN-20221002212623-20221003002623-00223.warc.gz"}