An identity involving Gauss sums and convolution For a Dirichlet character $\chi$ modulo $N$, the Gauss sum attached to $\chi$ is given by 
$$G_\chi(m) = \sum_{k \in \mathbb{Z}_N} \chi(k) e^{2\pi i mk/N}.$$
Suppose one has an $N$-periodic function $f$ satisfying
$$
G_\chi \ast f = G_\chi
$$
for all Dirichlet characters $\chi$ modulo $N$. Here the convolution $\ast$ means $(g \ast h )(m) := \sum_{k \in \mathbb{Z}_N} g(k) h(m-k)$ for any two $N$-periodic functions $g,h$. 
Question: Would you know what are (some) necessary and sufficient conditions that $f$ must satisfy for the equality to hold? It looks rather strange to me that this could happen. BTW this convolution equality is trivially satisfied if one takes $f = \delta$, the Kronecker delta function. But what can we say when $f \neq \delta$? Thanks a lot!
 A: 
We have that $f*G_\chi =G_\chi$ if and only if $f$ is of the form $$f(m)=\delta(m)+\sum_{r:\ (r,N)>1} c_r e^{2\pi m r /N},$$ where $\delta$ is the delta function and the $c_r$ can be equal to any complex numbers.

We can expand $G_\chi * f(m)$ as a double sum $$G_\chi * f(m)=\sum_{k\in\mathbb{Z}_{N}}\sum_{r\in\mathbb{Z}_{N}}\chi(r)e^{2\pi ikr/N}f(m-k).$$ Rearranging this we obtain $$G_\chi * f(m)=\sum_{r\in\mathbb{Z}_{N}}\chi(r)\sum_{k\in\mathbb{Z}_{N}}f(m-k)e^{2\pi ikr/N}$$ $$=\sum_{r\in\mathbb{Z}_{N}}\chi(r)e^{2\pi imr/N}\sum_{k\in\mathbb{Z}_{N}}f(k)e^{-2\pi ikr/N}=\sum_{r\in\mathbb{Z}_{N}}\chi(r)e^{2\pi imr/N}\hat{f}(r).$$ Now, you are asking when do we have the equality $$\sum_{r\in\mathbb{Z}_{N}}\chi(r)e^{2\pi imr/N}\hat{f}(r)=\sum_{r\in\mathbb{Z}_{N}}\chi(r)e^{2\pi imr/N}$$  for all $m$. This is automatically satisfied if $\hat{f}(r)=1$ for all $(r,N)=1$, and since I can isolate any particular coefficient by taking sums over many different values of $m$, this happens precisely when $\hat{f}(r)=1$ for all $(r,N)=1$. To obtain the stated result, we take the inverse Fourier transform.
