Periodic series help Is there an infinite series composed possibly of periodic functions for a function $f(k)$ with the property that if, $ k\equiv b $ mod a, $f(k)=1$, and if not $f(k)=0$,
 A: I'm interpreting the question as asking for a trigonometric function $f(x)$ such that for integers $k$, $f(k) = 1$ if $k \equiv b \mod a$ and $f(k) = 0$ otherwise, where $b$ is an integer and $a$ is a positive integer.
You could take $$f(x) = a^{-1} \sum_{j=0}^{a-1} e^{2 \pi i (x-b)/a}$$
If you insist on an infinite series rather than a finite sum, just add terms such as $c_n \sin(n \pi x)$ that are $0$ on the integers, with appropriate coefficients.
A: I'm not sure what you mean by periodic function.
You could have $\sum \sin\left( \cfrac{1}{n^2}\right)$ and since you have $\sin\left( \cfrac{1}{n^2}\right) \sim_0 \cfrac{1}{n^2}$ and $\sum  \cfrac{1}{n^2}$ converges, it would converge.
But if what you mean by periodic is that every $p$ numbers, you get the same value again then, if you have one non-zero value, $\sigma u_n$ will diverge because $(u_n)_n$ won't converge to $0$ (because $\exists \epsilon > 0, \forall n_0 \in \mathbb{N}, \exists n \ge n_0, u_n > \epsilon$, you would need to take $\epsilon$ smaller in norm than your non-zero value and then for $n$ you just pick the next index at which you get that non-zero value).

Apparently, you're in the second case.
$\exists \epsilon > 0, \forall n_0 \in \mathbb{N}, \exists n \ge n_0, u_n > \epsilon$
You can take $\epsilon = \cfrac{1}{2}$ and $n=b+ka$ for some $k\in\mathbb{N}$ and you can find one such $n\ge n_0, \forall n_0$.
So $(u_n)_n$ doesn't converge to 0 so $\sum u_n$ has no chance of converging.
