# Quadratic Gauss sums: Explicit determinations?

Can anyone please tell me (give me a reference, preferably) if there is any explicit determination of sums of the form $g(n,\chi):=\sum_{r=1}^{q}\chi(r)e(\frac{rn+r^2}{q})$ where $\chi$ is a Dirichlet character modulo $q$, not necessarily primitive? Here $e(x)$ denotes $e^{2\pi ix}$.

That is not a quadratic Gauss sum and it most likely does not have an explicit formula. Indeed in the simple case $q=p$ a prime, by the Lefschetz trace formula, it is the trace of Frobenius of a rank $2$ Galois representation, which means it is the sum of two complex numbers of absolute value $\sqrt{p}$. But there should be no easy way to compute the numbers.
To confirm this, we can look at how the sum varies as a function of $n$ as a sheaf on $\mathbb A^1$. It is rank $2$ and lisse, hence its geometric monodromy group contains $SL_2$, which means it doesn't reduce to some simpler sheaf.
However two observations might be helpful: If $q$ is a product of relatively prime numbers, you can factor your sum as a product. If $q$ is a prime power, you can split your sum into a sum over congruence classes mod a smaller power where $rn+r^2$ simplifies to a linear function and so simplify the expression.
• Thank you @Will Sawin; I call it a quadratic Gauss sum because this is somewhat like the quadratic Gauss sum (except for the coefficient $\chi$). Aug 28, 2014 at 6:50