TITLE: Is the space of periodic real sequences a closed subspace of the bounded real sequences?
QUESTION [5 upvotes]: Let $E$ be the set of bounded real sequences equipped with the following norm:
$$||(a_n)_{n \in \mathbb{N}}||_{\infty}=\sup_{n \in \mathbb{N}}|a_n|$$
Let $P$ be the set of real periodic sequences, which is a subspace of $E$. 
Is $P$ is closed in $E$?

I suspect the answer is yes. I tried of a good while to construct a counterexample but failed.
Edit: what I tried...
Suppose $(s_n)_{n \in \mathbb{N}}$ is a sequence of elements of $P$ with limit $a$ in $E$, and let $p_n$ denotes the period of $s_n$. If $(p_n)_{n \in \mathbb{N}}$ is bounded then there is some number $p$ and a subsequence of $(s_n)_{n \in \mathbb{N}}$ in which each term is a sequence of period $p$, which implies $s$ has period $p$. 
To find a counterexample we would thus need $(p_n)$ unbounded and, assuming without loss of generality that $(p_n)$ is increasing, we would even need $p_{n+1}-p_n$ to be unbounded. Finally the limit sequence $a$ would need to satisfy for all $k$ and $m$: $a_{k+mp_n} \to a_{k}$  as $n$ tends to infinity. Already constructing such a limit sequence $a$ is far from obvious!

REPLY [10 votes]: For a prime $p$, consider the sequence $x^{(p)}$ with
$$x^{(p)}_n = \begin{cases} 1 &, p \mid n \\ 0 &, p \nmid n\end{cases}$$
and then
$$x = \sum_p 2^{-p}\cdot x^{(p)}.$$
Show that $x$ is not periodic.