Character-twisted Eisenstein series (source code)

= Character-twisted Eisenstein series
{title2=$G_k(\chi,z)$}

For an <integer> $k>2$ and a <Dirichlet character> $\chi$ modulo $N\ge1$ with $\chi(-1)=(-1)^k$, define
$$
G_k(\chi,z)=\sum_{\substack{m,n\in\mathbb Z,\ (m,n)\ne(0,0)\\\gcd(n,N)=1}}\frac{\chi(n)}{(mz+n)^k}.
$$
The zero pair is explicitly excluded, including when $N=1$. Comparison with a convergent <lattice Eisenstein sum> proves absolute and locally uniform convergence on the <complex upper half-plane>, hence holomorphy. Replacing $z$ by $z+N$ permutes the terms by $n\mapsto n+mN$ without changing $\chi(n)$ or its coprimality condition, so the period is $N$. The parity condition makes the terms indexed by $(m,n)$ and $(-m,-n)$ agree instead of cancel.