Character twist by rational translations of a cusp form (source code)

= Character twist by rational translations of a cusp form
{title2=$f_\chi(z)=\sum_{j\in(\mathbb Z/N\mathbb Z)^\times}\chi(j)^{-1}f(z+j/N)$}

For a level-one <cusp form> and any <Dirichlet character> modulo $N>1$, this translation sum is a <cusp form> on $\Gamma_1(N)\cap\Gamma_0(N^2)$. Conjugating that subgroup by $\begin{pmatrix}1&j/N\\0&1\end{pmatrix}$ yields integral determinant-one <matrices>; <cusp holomorphy under rational slash operators> supplies all cusp conditions. Its exact <Fourier coefficients> at positive indices are $a_n(f)\sum_{j\in(\mathbb Z/N\mathbb Z)^\times}\chi(j)^{-1}e^{2\pi inj/N}$. For a <primitive Dirichlet character> they equal $g(\overline\chi)\chi(n)a_n(f)$, by the <finite Fourier transform of a primitive Dirichlet character>. For imprimitive characters the sum can be nonzero at nonunits, so the simplified twist formula need not hold.