Dense subset in a product of $p$-adic groups? Let $p$ be a rational prime. Consider the topological group $\prod_{\ell\ne p} {\mathbb Z}_{\ell} $. Does there exist a natural number $M$ such that $\{p^{n_1}+p^{n_2}+\cdots+p^{n_m}: \text{$0\le m\le M$ and $n_i\ge 0$
for each $i$}\}$ is a dense subset of $\prod_{\ell\ne p} {\mathbb Z}_{\ell}$?
How about the following weaker assertion?
For each $x\in \prod_{\ell\ne p} {\mathbb Z}_{\ell}$, there exist a natural number $M_x$ such that $x$ lies in the closure of $\{e_1p^{n_1}+e_2p^{n_2}+\cdots+e_mp^{n_m}: \text{$0\le m\le M_x$ and $n_i\ge 0$ and $e_i\in\{-1,1\}$ for each $i$}\}$ in $\prod_{\ell\ne p} {\mathbb Z}_{\ell}$. 
Can it hold?
 A: Assuming that there are infinitely many primes $\ell$ of the form $\ell =(p^k-1)/(p-1)$, then no. For those primes $p^{n_i}$ takes $k$ distinct values so $\sum_{i=1}^M p^{n_i}$ takes at most $k^M$ values modulo $\ell$ and $k^M < \ell$ for $k$ large enough, so your set does not cover $\mathbb{Z}/\ell$, so is not dense in $\mathbb{Z}_{\ell}$, so is not dense in the product.
A: Felipe's idea can be converted into a rigorous proof that there is no such $M$. 
Fix a positive $\epsilon < 1/M$. Suppose $m$ is a large positive integer  prime to $p$ with the property that the units group $U(\mathbb{Z}/m\mathbb{Z})$ has an exponent $\lambda$ (say) smaller than $m^{\epsilon}$. Then, modulo $m$, the number of distinct sums of the type you describe is at most $1+\lambda+\lambda^2 + \dots + \lambda^M$, and this is $< m$ (provided $m$ is large enough in terms of $M$ and $\epsilon$). For such an $m$, your set does not cover $\mathbb{Z}/m\mathbb{Z}$ and so your set cannot be dense in $\prod_{\ell \ne p} \mathbb{Z}_{\ell}$.
How do we know such an $m$ exists? This is a special case of known results on small values of the Carmichael $\lambda$-function. See, e.g., Lemma 1.2 in this recent note: http://alpha.math.uga.edu/~pollack/sunit-impan.pdf
EDITED LATER: This was overkill. We don't need to control the exponent of $U(\mathbb{Z}/m\mathbb{Z})$, just the order of $p$ modulo $m$. And with this change, it's easy to produce the desired $m$: Just take $m = p^k-1$, for a sufficiently large $k$. (Or, as in Felipe's post, $(p^k-1)/(p-1)$.)
