TITLE: Analog of the Birkhoff's ergodic theorem for the sequence of squares
QUESTION [5 upvotes]: Consider a dynamical system $(X, \mathcal{B}(X), \mu, T)$ where $(X, \mathcal{B}(X), \mu)$ is a measure space and $T$ is a measure-preserving, invertible transformation. 
Then by the classical Birkhoff's ergodic theorem if $p\ge 1$, then for any $f\in L^p(X, \mu)$ the sequence
$$
\mathcal{M}_N f(x):=\frac{1}{N}\sum_{n=0}^N f(T^n x)
$$ 
converges for almost every $x\in X$. 
$\textbf{Question:}$ Is it true that the sequence
$$
\mathcal{A}_N f(x):=\frac{1}{N}\sum_{n=0}^N f(T^{n^2} x)
$$
is convergent a.e. for $f\in L^p(X,\mu)$ and $p\ge 1$?
I'll be more than happy to see the answer to my naive question for a particular case when: $X=\mathbb{Z}$, $\mu$ is a counting measure and $T$ being a regular shift operator $Tf(x)=f(x+1)$. In this case 
$$
\mathcal{A}_N f(x):=\frac{1}{N}\sum_{n=0}^N f(x+n^2), \qquad x\in\mathbb{Z}
$$
for $f\in \ell^p(\mathbb{Z})$.
 It seems that the problem reduces to the study of the boundedness of the maximal function:
$$
f\mapsto\sup_N \mathcal{A}_N |f|.
$$ 
Is there a smart way of getting this boundedness from the corresponding result in the continuous setting? I tried to apply some known transference principles, but it seems to me, that the fact that there are large gaps between squares, namely $(n+1)^2-n^2\simeq n$, causes some trouble. Please excuse me if I'm overlooking something obvious here.

REPLY [3 votes]: If $X=\mathbb{Z}$, $\mu$ is the counting measure, and $T$ is the shift operator given by $Tf(x)=f(x+1)$, then for all real $p\ge1$, $f\in\ell^p(\mathbb{Z})$, and $x\in\mathbb{Z}$, by Hölder's inequality,
$$
|\mathcal{A}_N f(x)|\le \frac1N\,\sum_{n=0}^N|f(x+n^2)|
\le\frac1N\,\|f\|_p\,(N+1)^{1-1/p}\to0 
$$
and hence $\mathcal{A}_N f(x)\to0$ as $N\to\infty$.