Extension of Poisson Summation formula

The correct formula is, for $\chi$ primitive of conductor $q$, $$ \sum_{n\in\mathbb{Z}}\chi(n)f\left(\frac{nx}{\sqrt{q}}\right) = \frac{A}{x}\sum_{n\in\mathbb{Z}}\bar\chi(n)\hat f\left(\frac{n/x}{\sqrt{q}}\right). $$ Here $A:=\sqrt{q}/\tau(\bar\chi)$ is the so-called root number, it is of modulus $1$.

This formula is essentially equivalent to the functional equation of $L(s,\chi)$, but let me provide a direct proof. We start from the well-known formula $$ \chi(n) = \frac{1}{\tau(\bar\chi)}\sum_{m=1}^q\bar\chi(m)e\left(\frac{mn}{q}\right), $$ where $e(x)$ abbreviates $e^{2\pi i x}$. See Davenport: Multiplicative number theory, Chapter IX, equation (6). Then we can rewrite the left hand side in the formula as $$ \sum_{n\in\mathbb{Z}}\chi(n)f\left(\frac{nx}{\sqrt{q}}\right) = \frac{1}{\tau(\bar\chi)}\sum_{m=1}^q\bar\chi(m) \sum_{n\in\mathbb{Z}} e\left(\frac{mn}{q}\right) f\left(\frac{nx}{\sqrt{q}}\right).$$ Applying the Poission summation formula for the inner sum on the right hand side, $$ \sum_{n\in\mathbb{Z}}\chi(n)f\left(\frac{nx}{\sqrt{q}}\right) = \frac{1}{\tau(\bar\chi)}\sum_{m=1}^q\bar\chi(m) \sum_{k\in\mathbb{Z}}\int_{-\infty}^\infty e\left(\frac{mt}{q}+kt\right) f\left(\frac{tx}{\sqrt{q}}\right)\,dt. $$ Denoting $n:=m+qk$ on the right hand side, we obtain $$ \sum_{n\in\mathbb{Z}}\chi(n)f\left(\frac{nx}{\sqrt{q}}\right) = \frac{1}{\tau(\bar\chi)}\sum_{n\in\mathbb{Z}}\bar\chi(n) \int_{-\infty}^\infty e\left(\frac{nt}{q}\right) f\left(\frac{tx}{\sqrt{q}}\right)\,dt. $$ By a change of variable, $$ \sum_{n\in\mathbb{Z}}\chi(n)f\left(\frac{nx}{\sqrt{q}}\right) = \frac{A}{x}\sum_{n\in\mathbb{Z}}\bar\chi(n) \int_{-\infty}^\infty e\left(\frac{nt/x}{\sqrt{q}}\right) f(t)\,dt, $$ where $A$ is as above. This is the stated (corrected) formula.

Remark of 10/14/2013. The formula as proved above holds for integrable continuous functions satisfying $|f(t)|+|\hat f(t)|\ll (1+|t|)^{-1-\delta}$ for some $\delta>0$. I had an Addendum of 10/12/2013 here with a seemingly more relaxed condition for $q>1$, but this condition turned out to be equivalent to the original one by basic facts on the Fourier transform.


I wanted to simply make a comment in GH's answer, but it's getting too long.

Another very similar way to obtain the formula is the following. (EDIT: This proof is essentially the same as the one given by Noam Elkies in a comment under the question.) After having appropriately normalized, we reduce the formula to showing that $$ \sum_n f(n)\chi(n) = \frac{\tau(\chi)}{q} \sum_n \hat{f}\left(\frac{n}{q}\right)\bar{\chi}(n) . $$ (Remark: I use the definition $\hat{f}(\xi) = \int_{\mathbb{R}} f(t) e(-\xi t)dt$, whereas in GH's proof the exponential is $e(\xi t)$. This explains some discrepancies.) Now, note that the arithmetic progression $n\equiv a\pmod q$ is a shifted lattice of $\mathbb{R}$. In fact, $$ \sum_{n\equiv a\pmod q}f(n) = \frac{1}{q}\sum_{n} e\left(\frac{an}{q}\right) \hat{f}\left(\frac{n}{q}\right), $$ a corollary of the full Poisson summation formula. Then we have that $$ \sum_{n}f(n)\chi(n)= \sum_{a=1}^q \chi(a) \sum_{n\equiv a\pmod q} f(n) = \frac{1}{q} \sum_{a=1}^q \chi(a) \sum_{n} e\left(\frac{an}{q}\right) \hat{f}\left(\frac{n}{q}\right) = \frac{\tau(\chi)}{q} \sum_n \hat{f}\left(\frac{n}{q}\right)\bar{\chi}(n) , $$ since $$ \sum_{a=1}^q \chi(a) e\left(\frac{an}{q}\right) = \bar{\chi}(n)\tau(\chi) $$ for all $n$ if $\chi$ is a primitive character mod $q$. (A fancy way to read this last formula which might be useful conceptually is "a primitive character $\chi$ is an eigenvector of the operator $\bar{F}$, where $F$ is the Fourier transform mod $q$, with eigenvalue $\overline{\tau(\chi)}$.)