How to prove a generalized Gauss sum formula I read the wikipedia article on quadratic Gauss sum. link
First let me write a definition of a generalized Gauss sum.
Let $G(a, c)= \sum_{n=0}^{c-1}\exp (\frac{an^2}{c})$, where $a$ and $c$  are relatively prime integers.
(Here is another question. Is the function $e(x)$ defined in the article equal to $\exp(2\pi i/x)$ or $\exp(\pi i/x)$?)
In the article, a formula is given according to values of $a$ and $c$.
For example, if $a$ is odd and $4|c$, then
$G(a, c)=(1+i)\epsilon_a^{-1} \sqrt{c} \big(\frac{c}{a}\big)$, where  $\big(\frac{c}{a}\big)$ is the Jacobi symbol.
I would like to prove it but I don't know how to do it. Could you give me a guide?

The quadratic Gauss sum is given by
\begin{eqnarray*}
G(s;k) = \sum_{x=0}^{k-1} e\left(\frac{sx^2}k\right),
\end{eqnarray*}
where $\displaystyle e(\alpha) = e^{2\pi \imath \alpha}$, $s$ is any integer coprime to $p$ and $k$ is a positive integer. The generalized Gauss sums is given by
\begin{eqnarray*}
G(a,b,c) = \sum_{x=0}^{|c|-1} e\left(\frac{ax^2+bx}c\right),
\end{eqnarray*}
where $ac \neq 0$ and $ac+b$ is even.
It is well known that
\begin{eqnarray*}
G(s;k) = \begin{cases}
 \left(1+\imath^s\right)\left(\frac ks\right)\sqrt{k} &\mbox{ if } k \equiv 0 \mod 4\\
\left(\frac sk\right)\sqrt{k} &\mbox{ if } k \equiv 1 \mod 4\\
0 &\mbox{ if } k \equiv 2 \mod 4\\
\imath \left(\frac sk\right)\sqrt{k} &\mbox{ if } k \equiv 3 \mod 4
\end{cases}
\end{eqnarray*}
There are many proofs for the above formula: Gauss proved it using elementary methods, Dirichlet used a poisson summation formula, Cauchy used a transformation function for the classical theta function, etc... An elementary proof in the style of Gauss is available in the book Gauss and Jacobi Sums by Berndt, Evans and Williams and also the book Introduction to Number Theory by Nagell.
One method is to show, for $k$ odd, $|G(s;k)|^2 = k$, and then determining the sign of $G(s;k)$ will be the hard part. From here you can use reduction properties of the quadratic Gauss sum and the Chinese Remainder Theorem to prove the even cases.
There is no general formula for a generalized Gauss sum. You can find a reciprocity theorem for these sums in the book Gauss and Jacobi Sums as well, also in Introduction to Analytic Number Theory by Apostol.
