This is an exercise in the book 'integral transforms and their applications' by Davies.
The problem is to evaluate the series as a generalized function.
$$ \sum_{n\in \mathbb{Z}} n^m e^{i n x } ,$$
with $ m > 0 $.
If $m =0$, I can recognize it as a series of delta functions. But I cannot envision what the function is like for $m> 0$.
How to proceed?
Make it clear this is not a function.
Let $f_k(x) = \sum_{n=-k}^k n^m e^{inx}$ and $\phi\in C^\infty(\Bbb{R/2\pi Z})$ any smooth $2\pi$-periodic function then $$\phi(x) =\frac{1}{2\pi} \sum_n \hat{\phi}(n) e^{inx}$$ $$ f_k \ast \phi(x) = \frac{1}{2\pi} \int_0^{2\pi} f_k(x-y)\phi(y)dy = \frac{1}{2\pi} \sum_{n=-k}^k n^m \hat{\phi}(n) e^{inx}$$ $$\lim_{k \to \infty} f_k \ast \phi(x) = \frac{1}{2\pi} \sum_n n^m \hat{\phi}(n) e^{inx}=i^{-m} \phi^{(m)}(x) = i^{-m} (\delta \ast \phi)^{(m)}(x)= i^{-m} \delta^{(m)} \ast \phi (x)$$ therefore $\lim_{k \to \infty}f_k =i^{-m} \delta^{(m)}$ where the latter convergence is in the sense of distributions on $C^\infty(\Bbb{R/2\pi Z})$