Let $f\in M_k(\text{SL2}(\mathbb{Z}))$ and $$ f_N(\tau) :=\sum_{r=0}^{N-1}{f(\frac{\tau +r}{N})} $$ then $f\in M_k(\Gamma_o(N))$
To check that $f\in M_k(\Gamma_o(N))$ I have to check that
$$ f_{\vert k \gamma} = f \; \text{for all }\gamma \in \Gamma_o(N) $$
and $$f_{\vert k \alpha^{-1}} = \sum_{n=0}^{\infty}{a_n \exp{(\frac{2\pi i n}{N}})} \text{ for all }\gamma \in \text{SL2}(\mathbb{Z})\; .$$
By definition of $f_N$ it's N-periodic and therefore has a fourier series of the form
$$ \sum_{n=0}^{\infty}{c_n\exp(\frac{2\pi i n \tau}{N})} $$
I had a hard time checking the conditions above as "simply" plugging in $\tau = \gamma \tau$ and using the transformation for modular forms of weight $k$ didn't help. Whats the best way to check both conditions ?
Would appreciate any help/hint
$$U_N f=\frac1N \sum_{r=0}^{N-1}{f(\frac{z+r}{N})} = \sum_n a_{nN}(f) e^{2i\pi nz}, \qquad U_N = \prod_{p^k \| N} U_p^k$$
For $f\in M_k(\Gamma_0(m))$ $$ U_p f= T_p f-1_{p\ \nmid\ m} p^{k-1}f(pz)$$ where $T_p$ is the Hecke operator $M_k(\Gamma_0(m))\to M_k(\Gamma_0(m))$,
$$T_p f\in M_k(\Gamma_0(m)),\qquad f(pz) \in M_k(\Gamma_0(pm))$$ so that $U_p f\in M_k(\Gamma_0(pm))$ and $$U_N f\in M_k(\Gamma_0(Nm))$$ In fact $U_N f\in M_k(\Gamma_0(m\prod_{p| N} p))$