Let $C(x\_1,\ldots,x\_n)$ be a nonsigular cubic form with integral coefficients.
In his proof that $C$ fulfills the Hasse-Principle, if $n\geq 9$, Hooley used the following estimate that was provided by Katz in *Perversity and Exponential Sums*:


There exists a subset $\mathcal{P}$ of primes, having positive Dirichlet density $A<1$ and such
that for all $w\in \mathcal{P}$ we have
$$
\sum\_{\mathbf{b}(\text{mod } w)} |\sum\_{\substack{t (\text{mod } w)\\ (t,w)=1}} \sum\_{\mathbf{x} (\text{mod } w)}e\_w(tC(\mathbf{x})+\mathbf{b}.\mathbf{x})|<Aw^{(3n+1)/2}
$$
where $\mathbf{b}$ is the vector $(b\_1,\ldots b\_n)$, $e\_q(z)=e^{2 \pi \text{i} z/q}$ and $\mathbf{a} \cdot \mathbf{b}=\sum\_{i=1}^n a\_i b\_i$.


Question:
Can we do the same when we twist the innermost sum by $\chi(t)$ for a multiplicative character $\chi$? (I need it only in the case where $\chi$ is the Legendre symbol.)


Context:
I am trying to prove the Hasse-Principle for $C(\mathbf{x})=y^2$ and $n=6$. Everything goes through nicely up to the aforementioned problem.


Looking at prime moduli and not averaging over $\mathbf{b}$, there were sufficient results (provided by Katz) that showed that the additional character does not matter, but I was not able to find it in the averaged case. My own knowledge of algebraic geometry is insufficient to change the proof in *Perversity and Exponential sums*.



Twisting by a multiplicative Character in Katz, Perversity and Exponential sums
First, an elementary manipulation of your sum. $\sum\_{t \mod w} \chi(t) e\_w (t C(\mathbf{x}))$ is some fixed Gauss sum times $\chi^{-1} ( C(\mathbf{x}))$.


You want to take in the notation of Katz's Section 4:


$R = \mathbb Z$, $S = \operatorname{Spec} \mathbb Z$, $r= n$, $E = \mathbb Z^{n}$, $X = \mathbb A^n$, $V= $ the locus in $\mathbb A^n$ where $C(\mathbf{x}) \neq 0$.


$\mathcal F =$ the Kummer sheaf associated to $\chi^{-1} $, pulled back along $C$.


Then the estimate you desire follows from Theorem 4.10 of Katz's paper as long as the A-number is at least $2$.


To calculate the $A$-number, we first need to calculate the middle extension $K$ of $\mathcal F$ from $V$. I think in this case it's the same as $\mathcal F$ as long as the order of $\chi$ is not $3$. It's easy to see that the middle extension vanishes on the smooth part of the vanishing locus of $C$. To check that it vanishes at $0$, note that the stalk of the middle extension of $\mathcal F$ at $0$, is naturally isomorphic to the stalk of $\mathcal F$ pulled back by scaling by $\lambda$, but $\mathcal F$ pulled back by scaling by $\lambda$ is $\mathcal F$ twisted by $\mathcal L\_\chi (\lambda^{3})$, which depends nontrivially on $\lambda$, so these can't be isomorphic unless they vanish.


So that means we just need to calculate the difference between the compactly-supported Euler characteristc of $\mathcal F$ and the compactly supported Euler characteristic of a generial hyperplane section. By the same symmetry argument, the compactly supported Euler characteristic of $F$, vanishes whereas the compactly supported Euler charateristic of a linear section is the Euler characteristic of a Dirichlet character of a smooth cubic polynomial in $n$ variables, which is $1$ minus the compactly supported Euler characteristic of the vanishing locus of that polynomial, which is a smooth affine cubic hypersurface in $n$ variables, which is $2^n$.


So it looks to me like the $A$-number is $2^n-1$ and you are fine as long as $n \geq 2$. 


