  Let $G$ denote a compact monothetic group, and let $$\rho (x) = \alpha_k x^k
+ \ldots + \alpha_1 x + \alpha_0,$$ where $\alpha_0, \ldots , \alpha_k$ are
elements of $G$ one of which is a generator of $G$. Let $(p_n)_{n\geq 1}$
denote the sequence of rational prime numbers. Suppose $f \in L^{p}(G)$ for $p>
1$. It is known that if $$A_{N}f(x) := {1 \over N} \sum_{n=1}^{N} f(x + \rho
(p_n)) \qquad (N=1,2, \ldots ),$$ then the limit $\lim _{n\to \infty} A_Nf(x)$
exists for almost all $x$ with respect Haar measure. We show that if $G$ is
connected then the limit is $\int_{G} f d\lambda$. In the case where $G$ is the
$a$-adic integers, which is a totally disconnected group, the limit is
described in terms of Fourier multipliers which are generalizations of Gauss
sums.

Number Theory