group/.append style=orange, milestone/.append style=red, progress label node
anchor/.append style=text=red

# Ergodic averages for sparse sequences along primes

Andreas Koutsogiannis and Konstantinos Tsinas  Department of Mathematics,
Aristotle University of Thessaloniki, Thessaloniki 54124, Greece
<EMAIL_ADDRESS>Department of Mathematics and Applied Mathematics,
University of Crete, Voutes University Campus, Heraklion 70013, Greece
<EMAIL_ADDRESS>
###### Abstract.

We investigate the limiting behavior of multiple ergodic averages along sparse
sequences evaluated at prime numbers. Our sequences arise from smooth and
well-behaved functions that have polynomial growth. Central to this topic is a
comparison result between standard Cesáro averages along positive integers and
averages weighted by the (modified) von Mangoldt function. The main
ingredients are a recent result of Matomäki, Shao, Tao and Teräväinen on the
Gowers uniformity of the latter function in short intervals, a lifting
argument that allows one to pass from actions of integers to flows, a
simultaneous (variable) polynomial approximation in appropriate short
intervals, and some quantitative equidistribution results for the former
polynomials. We derive numerous applications in multiple recurrence, additive
combinatorics, and equidistribution in nilmanifolds along primes. In
particular, we deduce that any set of positive density contains arithmetic
progressions with step $\lfloor p^{c}\rfloor$, where $c$ is a positive non-
integer and $p$ denotes a prime, establishing a conjecture of Frantzikinakis.

###### Key words and phrases:

Ergodic averages, recurrence, prime numbers, Hardy fields.

###### 2020 Mathematics Subject Classification:

Primary: 37A44; Secondary: 28D05, 11B30

The second author was supported by ELIDEK–Fellowship number 5367 (3rd Call for
HFRI Ph.D. Fellowships).

###### Contents

  1. 1 Introduction and main results
  2. 2 Background
  3. 3 Lifting to an extension flow
  4. 4 Equidistribution in short intervals
  5. 5 The main comparison
  6. 6 Proofs of the remaining theorems
  7. 7 More general iterates

##  1\. Introduction and main results

###  1.1. Motivation

The seminal work of Furstenberg [18] towards Szemerédi’s theorem has initiated
significant interest in the study of ergodic theoretic problems and their
applications in problems of combinatorial or number-theoretic nature.
Dynamical methods have proven extremely effective at tackling problems
relating to the combinatorial richness of positive density subsets of
integers. Furthermore, there are frequently no alternative methods that can
recover the results that ergodic theoretic tools provide. For instance, we
have far-reaching generalizations of Szemerédi’s theorem, such as the
Bergelson-Leibman theorem [2] that produces polynomial progressions on sets of
integers with positive density.

The general structure of our problems is the following: we are given a
collection of sequences $a_{1}(n),\dots,a_{k}(n)$ of integers and a standard
probability space $(X,\mathcal{X},\mu)$ equipped with invertible, commuting,
measure-preserving transformations $T_{1},\dots,T_{k}$ that act on $X,$ and we
examine the limiting behavior of the multiple averages

(1) $\frac{1}{N}\sum_{n=1}^{N}T_{1}^{a_{1}(n)}f_{1}\cdot\ldots\cdot
T_{k}^{a_{k}(n)}f_{k}.$

Throughout the article, these assumptions on the transformations will be
implicit; we call the tuple $(X,\mathcal{X},\mu,T_{1},\ldots,T_{k})$ a
_measure-preserving system_ (or just _system_). Here $f_{1},\dots,f_{k}$ are
functions in $L^{\infty}(\mu)$ and we concern ourselves with their convergence
mainly in the $L^{2}$-sense. In view of Furstenberg’s correspondence
principle, a satisfactory answer to this problem typically ensures that sets
with positive density possess patterns of the form
$(m,m+a_{1}(n),\dots,m+a_{k}(n))$, where $m,n\in\mathbb{N}$. Specializing to
the case where all the sequences are equal and $T_{i}=T^{i}$, we arrive at the
averages

(2) $\frac{1}{N}\sum_{n=1}^{N}T^{a(n)}f_{1}\cdot
T^{2a(n)}f_{2}\cdot\ldots\cdot T^{ka(n)}f_{k},$

which relate to patterns of arithmetic progressions, whose common difference
belongs to the set $\\{a(n){:}\;n\in\mathbb{N}\\}$.

Furthermore, it is particularly tempting to conjecture that results pertaining
to mean convergence of the averages in (1) should still be valid, if we
restrict the range of summation to a sparse set such as the primes.
Normalizing appropriately, we contemplate whether or not the averages

(3) $\frac{1}{\pi(N)}\sum_{p\in\mathbb{P}{:}\;p\leq
N}T_{1}^{a_{1}(p)}f_{1}\cdot\ldots\cdot T_{k}^{a_{k}(p)}f_{k}$

converge in $L^{2}(\mu)$ and what is the corresponding limit of these
averages. Here, $\pi(N)$ denotes the number of primes less than or equal to
$N$ and $\mathbb{P}$ is the set of primes.

The first results in this direction were established in the case $k=1$.
Namely, Sárközy [40] used methods from analytic number theory to show that
sets of positive density contain patterns of the form $(m,m+p-1)$, where $p$
is a prime.111Throughout this article, it will be a reoccurring theme that in
combinatorial applications, certain arithmetic obstructions force one to
consider the set of shifted primes $\mathbb{P}-1$ (or $\mathbb{P}+1$) in place
of $\mathbb{P}$, when dealing with polynomials. This is a necessary
assumption, as in such cases the corresponding results for the set
$\mathbb{P}$ are easily seen to be incorrect (see, for example, [42, Remark
1.4]).  Additionally, Wierdl [45] established the even stronger pointwise
convergence result for the averages (3) in the case $k=1$ and $a_{1}(n)=n$,
while Nair generalized this theorem to polynomials evaluated at primes [38].

In the setting of several iterates, the first results were provided by
Frantzikinakis, Host, and Kra [16], who established that sets of positive
density contain 3-term arithmetic progressions whose common difference is a
shifted prime. Furthermore, they demonstrated that the averages in (3)
converge in the case $k=2$, $T_{1}=T_{2}$ and $a_{i}(n)=in,\ i\in\\{1,2\\}$.
This was generalized significantly by Wooley and Ziegler [47] to hold in the
case that the sequences $a_{i}(n),\ i\in\\{1,\dots,k\\}$ are polynomials with
integer coefficients and the transformations $T_{1},\dots,T_{k}$ are the same.
Following that, Frantzikinakis, Host, and Kra confirmed the validity of the
Bergelson-Leibman theorem in [17] along the shifted primes. In addition, they
showed that the averages in (3) converge in norm when $a_{i}(n)$ are integer
polynomials. Furthermore, Sun obtained convergence and recurrence results in
[42] for a single transformation and iterates of the form $i{\left\lfloor
an\right\rfloor},\ i\in\\{1,\dots,k\\}$ or ${\left\lfloor jan\right\rfloor},\
j\in\\{1,\dots,k\\},$ with $a$ irrational. Finally, using the convergence
results in [30] along $\mathbb{N}$ for integer parts of real polynomials and
several transformations, the first author extended the convergence result of
[17] to real polynomials in [29], obtaining recurrence for polynomials with
real coefficients rounded to the closest integer. In all of the previous
cases, combinatorial applications along the shifted primes were derived as
well.

In the case of multiple iterates, a shared theme in the methods used has been
the close reliance on the deep results provided by the work of Green and Tao
in their effort to show that primes contain arbitrarily long arithmetic
progressions [20]. For instance, all results222The methods in [47] do not
invoke the full power of this theorem, although their approach draws heavily
from the work of Green and Tao. relied on the Gowers uniformity of the
(modified) von Mangoldt function that was established in [21] conditional to
two deep conjectures, which were subsequently verified in [24] and [22].

It was conjectured by Frantzikinakis that the polynomial theorems along primes
should hold for more general sequences involving fractional powers $n^{c}$,
such as ${\left\lfloor n^{3/2}\right\rfloor},{\left\lfloor
n^{\sqrt{2}}\right\rfloor}$ or even linear combinations thereof. Indeed, it
was conjectured in [10] that the sequence ${\left\lfloor
p_{n}^{c}\right\rfloor}$, where $c$ is a positive non-integer and $p_{n}$ is
the sequence of primes is good for multiple recurrence and convergence. To be
more precise, he conjectured that the averages

(4) $\frac{1}{\pi(N)}\sum_{p\in\mathbb{P}{:}\;p\leq N}T^{{\left\lfloor
p^{c}\right\rfloor}}f_{1}\cdot\ldots\cdot T^{k{\left\lfloor
p^{c}\right\rfloor}}f_{k}$

converge in $L^{2}(\mu)$ for all positive integers $k$ and all positive non-
integers $c$. Analogously, we have the associated multiple recurrence
conjecture, namely that all sets of positive upper density contain $k$-term
arithmetic progressions with common difference of the form ${\left\lfloor
p^{c}\right\rfloor}$. When $0<c<1$, one can leverage the fact that the range
of ${\left\lfloor p_{n}^{c}\right\rfloor}$ contains all sufficiently large
integers to establish the multiple recurrence result. Additionally, the
convergence of the previous averages is known in the case $k=1$ since one can
use the spectral theorem and the fact that the sequence $\\{p_{n}^{c}a\\}$ is
equidistributed mod 1 for all non-zero $a\in\mathbb{R}$. This last assertion
follows from [41] or [46] when $c<1$ and [34] in the case $c>1$.

There were significant obstructions to the solution of this problem. One
approach would be to modify the comparison method from [17] (concerning
polynomials), but the Gowers uniformity of the von Mangoldt functions is
insufficient to establish this claim. The other approach would be to use the
method of characteristic factors, which is based on the structure theorem of
Host-Kra [26]. Informally, this reduces the task of proving convergence to a
specific class of systems with special algebraic structure called
nilmanifolds. However, this required some equidistribution results on
nilmanifolds for the sequence ${\left\lfloor p_{n}^{c}\right\rfloor}$, which
were very difficult to establish.

A similar conjecture by Frantzikinakis was made for more general averages of
the form

$\frac{1}{\pi(N)}\sum_{p\in\mathbb{P}{:}\;p\leq N}T^{{\left\lfloor
p^{c_{1}}\right\rfloor}}f_{1}\cdot\ldots\cdot T^{{\left\lfloor
p^{c_{k}}\right\rfloor}}f_{k}$

for distinct positive non-integer $c_{1},\dots,c_{k}$. The recent result of
Frantzikinakis [13] verifies that these averages converge in $L^{2}(\mu)$ to
the product of the integrals of the functions $f_{1},\dots,f_{k}$ in any
ergodic system, even in the more general case where the sequences in the
iterates are linearly independent fractional polynomials. The number theoretic
input required is a sieve-theoretic upper bound for the number of tuples of
primes of a specific form, as well as an equidistribution result on fractional
powers of primes in the torus that was already known. These methods relied
heavily on the use of the joint ergodicity results in [14] and, thus, the
linear independence assumption on the fractional polynomials was absolutely
essential. In the same paper, it was conjectured [13, Problem] that the case
of fractional polynomials can be generalized to a significantly larger class
of functions of polynomial growth, called Hardy field functions, which we
consider below. The conjecture asks for necessary and sufficient conditions so
that the averages along primes converge to the product of the integrals in
ergodic systems. The arguments in [13] cannot cover this larger class of
functions,333A more fundamental obstruction in this more general setting was
that the necessary seminorm estimates were unavailable even in the simplest
case of averages along $\mathbb{N}$, apart from some known special cases. This
was established a few months later by the second author [44]. as it was
remarked in Subsection 1.3 of that article.

In this article, our objective is to strengthen the convergence results in
[17] and [13] and resolve the convergence problem of the averages in (4).
Actually, there is no advantage in confining ourselves to sequences of the
form ${\left\lfloor p^{c}\right\rfloor}$, so we consider the more general
class of sequences arising from Hardy field functions of polynomial growth
(see Section 2 for the general definition), which, loosely speaking, are
functions with pleasant behavior (such as smoothness, for instance). The
prototypical example of a Hardy field is the field $\mathcal{LE}$ of
logarithmico-exponential functions, which are defined by a finite combination
of the operations $+,-,\times,\div$ and the functions $\exp,\log$ acting on a
real variable $t$ and real constants. For instance, the field $\mathcal{LE}$
contains the functions $\log^{3/2}t,$ $t^{\pi},$ $t^{17}\log
t+\exp(\sqrt{t^{\log t}+\log\log t}).$ The fact that $\mathcal{LE}$ is a Hardy
field was established in [25] and the reader can keep this in mind as a model
case throughout this article. We resolve several conjectures involving the
convergence of the averages in (3) along Hardy sequences. Consequently, we
derive several applications in recurrence and combinatorics that expand the
known results in the literature. Finally, we also establish an
equidistribution result in nilmanifolds for sequences evaluated at primes.

###  1.2. Main results

We present here our main theorems. We start by stating our mean convergence
results, followed by their applications to multiple recurrence and
combinatorics, and conclude our presentation with the equidistribution results
in nilmanifolds. We will assume below that we are working with a Hardy field
$\mathcal{H}$ that contains the polynomial functions. This assumption is not
necessary, but it simplifies the proofs of our main theorems. Besides, this
restriction is very mild and the most interesting Hardy fields contain the
polynomials. A few results impose additional assumptions on $\mathcal{H}$ and
we state those when necessary. These extra assumptions are a byproduct of
convergence results along $\mathbb{N}$ in the literature that were proved
under these hypotheses and we will not need to use the implied additional
structure on $\mathcal{H}$ in any of our arguments.

####  1.2.1. Comparison between averaging schemes

For many number-theoretic problems, a suitable proxy for capturing the
distribution of the prime numbers is the von-Mangoldt function, which is
defined on $\mathbb{N}$ by

(5) $\Lambda(n)=\begin{cases}\log p&,\ \text{if }n=p^{k}\ \text{for some prime
}p\text{ and }k\in\mathbb{N}\\\ 0&,\ \text{otherwise}\end{cases}.$

The function $\Lambda$ has mean value 1 by the prime number theorem. Usually,
the prime powers with exponents at least 2 contribute a term of significantly
lower order in asymptotics, so one can think of $\Lambda$ as being supported
on primes. However, due to the irregularity of the distribution of $\Lambda$
in residue classes to small moduli, one typically considers a modified version
of $\Lambda$, called the W-tricked version. To define this, let $w$ be a
positive integer and let $W=\prod_{p\leq w,p\in\mathbb{P}}p$. Then, for any
integer $1\leq b\leq W$ with $(b,W)=1$, we define the $W$-tricked von Mangoldt
function $\Lambda_{w,b}$ by

(6) $\Lambda_{w,b}(n)=\frac{\phi(W)}{W}\Lambda(Wn+b),$

where $\phi$ denotes the Euler totient function.

Our main result provides a comparison between ergodic averages along primes
and averages along natural numbers. This will allow us to transfer mean
convergence results for Cesàro averages to the prime setting, answering
numerous conjectures regarding norm convergence of averages as those in (3)
followed by applications in multiple recurrence and combinatorics. We explain
the choice of the conditions on the functions $a_{ij}$ in Subsection 1.3.
Roughly speaking, the first condition implies that the sequence $a_{ij}$ is
equidistributed mod 1 due to a theorem of Boshernitzan (see Theorem D in
Section 2).

######  Theorem 1.1.

Let $\ell,k$ be positive integers and, for all $1\leq i\leq k,\ 1\leq
j\leq\ell$, let $a_{ij}\in\mathcal{H}$ be functions of polynomial growth such
that

(7) $\lim_{t\to+\infty}\left|\frac{a_{ij}(t)-q(t)}{\log t}\right|=+\infty\
\text{ for every polynomial }q(t)\in\mathbb{Q}[t],$

or

(8) $\lim\limits_{t\to+\infty}|a_{ij}(t)-q(t)|=0\ \text{ for some polynomial
}q(t)\in\mathbb{Q}[t]+\mathbb{R}.$

Then, for any measure-preserving system
$(X,\mathcal{X},\mu,T_{1},\dots,T_{k})$ and functions $f_{1},\dots,f_{\ell}\in
L^{\infty}(\mu)$, we have

$\lim_{w\to+\infty}\ \limsup\limits_{N\to+\infty}\
\max_{\underset{(b,W)=1}{1\leq b\leq W}}\
\Big{\lVert}\frac{1}{N}\sum_{n=1}^{N}\big{(}\Lambda_{w,b}(n)-1\big{)}\prod_{j=1}^{\ell}\big{(}\prod_{i=1}^{k}T_{i}^{{\left\lfloor
a_{ij}(Wn+b)\right\rfloor}}\big{)}f_{j}\Big{\rVert}_{L^{2}(\mu)}=0.$

######  Remark 1.

We can easily verify that each of the integer parts can be individually
replaced by other rounding functions, such as the ceiling function (which we
denote by $\lceil\cdot\rceil$) or the closest integer function (denoted by
$[[\cdot]]$). This is an immediate consequence of the identities $\lceil
x\rceil=-{\left\lfloor-x\right\rfloor}$ and $[[x]]={\left\lfloor
x+1/2\right\rfloor},$ for all $x\in\mathbb{R}$ and the fact that the affine
shifts (by rationals) $q_{1}a_{ij}+q_{2},q_{1},q_{2}\in\mathbb{Q}$, still
satisfy (7) or (8) if $a_{ij}$ does.

Theorem 1.1 is the main tool that we use to derive all of our applications.
The bulk of the article is aimed towards establishing it and everything else
is practically a corollary (in combination with known norm convergence
theorems for Cesàro averages). We remark that unlike several of the theorems
below, there are no “independence” assumptions between the functions $a_{ij}$,
although, in applications, we will need to impose analogous assumptions to
ensure convergence of the averages, firstly along $\mathbb{N}$, and then along
$\mathbb{P}$. In order to clarify how the comparison works, we present the
following theorem, which is effectively a corollary of Theorem 1.1 and which
shall be proven in Section 6.

######  Theorem 1.2.

Let $\ell,k$ be positive integers, $(X,\mathcal{X},\mu,T_{1},\dots,T_{k})$ be
a measure-preserving system and $f_{1},\dots,f_{k}\in L^{\infty}(\mu)$. Assume
that for all $1\leq i\leq k,\ 1\leq j\leq\ell$, $a_{ij}\in\mathcal{H}$ are
functions of polynomial growth such that the following conditions are
satisfied:
(a) Each one of the functions $a_{ij}(t)$ satisfies either $\eqref{E: far away
from rational polynomials}$ or (8).
(b) For all positive integers $W,b$, the averages

(9) $\frac{1}{N}\sum_{n=1}^{N}\big{(}\prod_{i=1}^{k}T_{i}^{{\left\lfloor
a_{i1}(Wn+b)\right\rfloor}}\big{)}f_{1}\cdot\ldots\cdot\big{(}\prod_{i=1}^{k}T_{i}^{{\left\lfloor
a_{i\ell}(Wn+b)\right\rfloor}}\big{)}f_{\ell}$

converge in $L^{2}(\mu)$.

Then, the averages

(10) $\frac{1}{\pi(N)}\sum_{p\in\mathbb{P}{:}\;p\leq
N}\big{(}\prod_{i=1}^{k}T_{i}^{{\left\lfloor
a_{i1}(p)\right\rfloor}}\big{)}f_{1}\cdot\ldots\cdot\big{(}\prod_{i=1}^{k}T_{i}^{{\left\lfloor
a_{i\ell}(p)\right\rfloor}}\big{)}f_{\ell}$

converge in $L^{2}(\mu)$.

Furthermore, if the averages in (9) converge to the function $F\in
L^{\infty}(\mu)$ for all positive integers $W,b$, then the limit in
$L^{2}(\mu)$ of the averages (10) is equal to $F$.

In the setting of Hardy field functions, the fact that we require convergence
for sequences along arithmetic progressions is typically harmless. Indeed,
convergence results along $\mathbb{N}$ typically follow from a growth
condition on the implicit functions $a_{ij}$ (such as (7)) and it is
straightforward to check that the function $a_{ij}(Wt+b)$ satisfies a similar
growth condition as well. Therefore, one can think of the second condition
morally as asking to establish convergence in the case $W=1$.

The final part of Theorem 1.2 allows us to compute the limit of averages along
primes in cases where we have an expression for the limit of the standard
Cesàro averages. This is possible, in rough terms, whenever the linear
combinations of the functions $a_{ij}$ do not contain polynomials or functions
that are approximately equal to a polynomial. The reason for that is that
there is no explicit description of the limit of polynomial ergodic averages
in a general measure preserving system (although one can get a simplified
expression in special cases, or under some total ergodicity assumptions on the
system).

####  1.2.2. Convergence of ergodic averages along primes

The foremost application is that the averages in (2) converge when $a(n)$ is a
Hardy sequence and when we average along primes. This will also lead to
generalizations of Szemerédi’s theorem in our applications. The following
theorem is a corollary of our comparison and the convergence results in [10]
(specifically, Theorems 2.1 and 2.2 of that paper). In conjunction with the
corresponding recurrence result of Theorem 1.6 below, we get an affirmative
answer to a stronger version of [10, Problem 7] (this problem also reappeared
in [12, Problem 27]), which was stated only for sequences of the form
$n^{c},c\in\mathbb{R}^{+}\setminus\mathbb{N}$.

######  Theorem 1.3.

Let $a\in\mathcal{H}$ be a function of polynomial growth that satisfies either

(11) $\lim_{t\to+\infty}\left|\frac{a(t)-cq(t)}{\log t}\right|=+\infty\text{
for every }c\in\mathbb{R}\text{ and every }q\in\mathbb{Z}[t],$

or

(12) $\lim\limits_{t\to+\infty}|a(t)-cq(t)|=d\ \text{for some
}c,d\in\mathbb{R}\ \text{and some }q\in\mathbb{Z}[t].$

Then, for any positive integer $k$, any measure-preserving system
$(X,\mathcal{X},\mu,T)$ and functions $f_{1},\dots,f_{k}\in L^{\infty}(\mu)$,
we have that the averages

(13) $\frac{1}{\pi(N)}\sum_{p\in\mathbb{P}{:}\;p\leq N}T^{{\left\lfloor
a(p)\right\rfloor}}f_{1}\cdot\ldots\cdot T^{k{\left\lfloor
a(p)\right\rfloor}}f_{k}$

converge in $L^{2}(\mu)$.

In particular, if $a$ satisfies (11), the limit of the averages in (13) is
equal to the limit in $L^{2}(\mu)$ of the averages

$\frac{1}{N}\sum_{n=1}^{N}T^{n}f_{1}\cdot\ldots\cdot T^{kn}f_{k}.$

######  Comment.

We can replace the floor function in (13) with either the function
$\lceil\cdot\rceil$ or the function $[[\cdot]]$. The assumption that the
iterates are Hardy field functions can also be relaxed. We discuss this more
in Section 7.

Observe that there is only one function appearing in the statement of the
previous theorem. The following convergence results concern the case where we
may have several different Hardy field functions. In both cases, there are
some "independence" assumptions between the functions involved, which has the
advantage of providing an exact description of the limit for the averages
along $\mathbb{N}$. Thus, we can get a description for the limit along
$\mathbb{P}$ as well.

The following theorem concerns the “jointly ergodic” case for one
transformation, which refers to the setting when we have convergence to the
product of the integrals in ergodic systems. Theorem 1.1 combines with [44,
Theorem 1.2] to provide the next result. This generalizes the theorem of
Frantzikinakis [13, Theorem 1.1] and gives a positive answer to [13, Problem].
Unlike the previous theorem, we have to impose here an additional assumption
on $\mathcal{H}$, since the respective convergence result along $\mathbb{N}$
is established under this condition. The field $\mathcal{LE}$ does not have
the property appearing in the ensuing theorem, but it is contained in the
Hardy field of Pfaffian functions, which does (for the definition, see [44,
Section 2]).

######  Theorem 1.4.

Let $\mathcal{H}$ be a Hardy field that contains $\mathcal{LE}$ and is closed
under composition and compositional inversion of functions, when
defined.444This means that if $f,g\in\mathcal{H}$ are such that
$g(t)\to+\infty$, then $f\circ g\in\mathcal{H}$ and $g^{-1}\in\mathcal{H}$.
For a positive integer $k,$ let $a_{1},\dots,a_{k}$ be functions of polynomial
growth and assume that every non-trivial linear combination $a$ of them
satisfies

(14) $\lim\limits_{t\to+\infty}\Bigl{|}\frac{a(t)-q(t)}{\log
t}\Bigr{|}=+\infty\text{ for every }q(t)\in\mathbb{Z}[t].$

Then, for any measure-preserving system $(X,\mathcal{X},\mu,T)$ and functions
$f_{1},\dots,f_{k}\in L^{\infty}(\mu)$, we have that

(15) $\lim\limits_{N\to+\infty}\frac{1}{\pi(N)}\sum_{p\in\mathbb{P}{:}\;p\leq
N}T^{{\left\lfloor a_{1}(p)\right\rfloor}}f_{1}\cdot\ldots\cdot
T^{{\left\lfloor
a_{k}(p)\right\rfloor}}f_{k}=\tilde{f}_{1}\cdot\ldots\cdot\tilde{f}_{k},$

where
$\tilde{f}_{i}:=\mathbb{E}(f_{i}|\mathcal{I}(T))=\lim_{N\to+\infty}\frac{1}{N}\sum_{n=1}^{N}T^{n}f_{i}$
and the convergence is in $L^{2}(\mu)$.

######  Remark 2.

We remark that we can also transfer the convergence result appearing in [43,
Theorem 1.3] to primes, although we do not have useful information on the
limiting behavior of the associated averages to deduce recurrence results.

In the case of several commuting transformations, knowledge of the limiting
behavior for averages along $\mathbb{N}$ is sparse. This is naturally a
barrier to proving multidimensional analogs of our recurrence results below
along primes. Nonetheless, we have the following convergence theorem, which
adapts the convergence result in [11, Theorem 2.3] to the prime setting. By a
shift-invariant Hardy field, we are referring to a Hardy field such that
$a(t+h)\in\mathcal{H}$ for any $h\in\mathbb{Z}$ and function
$a(t)\in\mathcal{H}$.

######  Theorem 1.5.

Let $k\in\mathbb{N},$ $\mathcal{H}$ be a shift-invariant Hardy field,
$a_{1},\dots,a_{k}$ be functions in $\mathcal{H}$ with pairwise distinct
growth rates and such that there exist integers $d_{i}\geq 0$ satisfying

$\lim\limits_{t\to+\infty}\Bigl{|}\frac{a_{i}(t)}{t^{d_{i}}\log
t}\Bigr{|}=\lim\limits_{t\to+\infty}\Bigl{|}\frac{t^{d_{i}+1}}{a_{i}(t)}\Bigr{|}=0.$

Then, for any system $(X,\mathcal{X},\mu,T_{1},\dots,T_{k})$ and functions
$f_{1},\dots,f_{k}\in L^{\infty}(\mu)$, we have

$\lim\limits_{N\to+\infty}\frac{1}{\pi(N)}\sum_{p\in\mathbb{P}{:}\;p\leq
N}T_{1}^{{\left\lfloor a_{1}(p)\right\rfloor}}f_{1}\cdot\ldots\cdot
T_{k}^{{\left\lfloor
a_{k}(p)\right\rfloor}}f_{k}=\tilde{f}_{1}\cdot\ldots\cdot\tilde{f}_{k},$

where
$\tilde{f}_{i}:=\mathbb{E}(f_{i}|\mathcal{I}(T_{i}))=\lim_{N\to+\infty}\frac{1}{N}\sum_{n=1}^{N}T_{i}^{n}f_{i}$
and the convergence is in $L^{2}(\mu)$.

While there are more restrictions compared to Theorem 1.4, we note that
Theorem 1.5 shows that we have norm convergence in the case when
$a_{i}(t)=t^{c_{i}}$ for distinct, positive non-integers $c_{i}$.

######  Comment.

In the previous two theorems, we can replace the integer part with any other
rounding function in each iterate individually (see Remark 1).

####  1.2.3. Applications to multiple recurrence and combinatorics

In this subsection, we will translate the previous convergence results to
multiple recurrence results and then combine them with Furstenberg’s
correspondence principle to extrapolate combinatorial applications. Due to
arithmetic obstructions arising from polynomials, we have to work with the set
of shifted primes in some cases. In addition, it was observed in [29] that in
the case of real polynomials, one needs to work with the rounding to the
closest integer function instead of the floor function. Indeed, even in the
case of sequences of the form ${\left\lfloor ap(n)+b\right\rfloor}$, explicit
conditions that describe multiple recurrence are very complicated (cf. [10,
Footnote 4]).

Our first application relates to the averages of the form as in (3). We have
the following theorem.

######  Theorem 1.6.

Let $a\in\mathcal{H}$ be a function of polynomial growth. Then, for any
measure-preserving system $(X,\mathcal{X},\mu,T),$ $k\in\mathbb{N},$ and set
$A$ with positive measure we have the following:
(a) If $a$ satisfies (11), we have

$\lim\limits_{N\to+\infty}\frac{1}{\pi(N)}\sum_{p\in\mathbb{P}{:}\;p\leq
N}\mu(A\cap T^{-{\left\lfloor a(p)\right\rfloor}}A\cap\dots\cap
T^{-{k{\left\lfloor a(p)\right\rfloor}}}A)>0.$

(b) If $a$ satisfies (12) with $cp(0)+d=0$,666 Notice here the usual necessary
assumption that we have to postulate on the polynomial, i.e., to have no
constant term, in order to obtain a recurrence, and, consequently, a
combinatorial result. then for any set $A$ with positive measure, the set

$\left\\{n\in\mathbb{N}:\;\mu\big{(}A\cap T^{-[[a(n)]]}A\cap\dots\cap
T^{-k[[a(n)]]}A\big{)}>0\right\\}$

has non-empty intersection with the sets $\mathbb{P}-1$ or $\mathbb{P}+1$.

We recall that for a subset $E$ of $\mathbb{N}$, its upper density
$\bar{d}(E)$ is defined by

$\bar{d}(E):=\limsup\limits_{N\to+\infty}\frac{|E\cap\\{1,\ldots,N\\}|}{N}.$

######  Corollary 1.7.

For any set $E\subseteq\mathbb{N}$ of positive upper density,
$k\in\mathbb{N},$ and function $a\in\mathcal{H}$ of polynomial growth, the
following holds:
(a) If $a$ satisfies (11), we have

$\liminf\limits_{N\to+\infty}\frac{1}{\pi(N)}\sum_{p\in\mathbb{P}{:}\;p\leq
N}\bar{d}\big{(}E\cap(E-{\left\lfloor
a(p)\right\rfloor})\cap\dots\cap(E-k{\left\lfloor
a(p)\right\rfloor})\big{)}>0.$

(b) If $a$ satisfies (12) with $cp(0)+d=0$, then the set

$\left\\{n\in\mathbb{N}:\;\bar{d}\big{(}E\cap(E-[[a(n)]])\cap\dots\cap(E-k[[a(n)]])\big{)}>0\right\\}$

has non-empty intersection with the sets $\mathbb{P}-1$ or $\mathbb{P}+1$.777
In this case only, $\bar{d}(E)$ can be replaced by
$d^{\ast}(E):=\limsup\limits_{|I|\to+\infty}\frac{|E\cap I|}{|I|}$ following
the arguments from [29], where the $\limsup$ is taken along all intervals
$I\subseteq\mathbb{Z}$ with lengths tending to infinity.

Specializing to the case where $a(n)=n^{c}$ where $c$ is a positive non-
integer, Theorem 1.3 and part (a) of Theorem 1.6 provide an affirmative answer
to [12, Problem 27].

######  Remark 3.

In part (a) of both Theorem 1.6 and Corollary 1.7, one can evaluate the
sequences along $p+u$ instead of $p$, for any $u\in\mathbb{Z}$, or even more
generally along the affine shifts $ap+b$ for $a,b\in\mathbb{Q}$ with $a\neq
0$. This follows from the fact that the function $a_{i}(at+b)$ satisfies (11)
as well. However, the shifts $p-1$ and $p+1$ are the only correct ones in part
(b) of Theorem 1.6. Notice also that the function
${\left\lfloor\cdot\right\rfloor}$ can be replaced by $\lceil\cdot\rceil$ or
$[[\cdot]]$ in part (a) of the two previous statements.

Now, we state the recurrence result obtained by Theorem 1.4.

######  Theorem 1.8.

Let $k\in\mathbb{N},$ $\mathcal{H}$ be a Hardy field that contains
$\mathcal{LE}$ and is closed under composition and compositional inversion of
functions, when defined, and suppose $a_{1},\dots,a_{k}\in\mathcal{H}$ are
functions of polynomial growth whose non-trivial linear combinations satisfy
(14). Then, for any measure-preserving system $(X,\mathcal{X},\mu,T),$ and set
$A$ with positive measure, we have that

$\lim\limits_{N\to+\infty}\frac{1}{\pi(N)}\sum_{p\in\mathbb{P}{:}\;p\leq
N}\mu\big{(}A\cap T^{-{\left\lfloor a_{1}(p)\right\rfloor}}A\cap\dots\cap
T^{-{\left\lfloor
a_{k}(p)\right\rfloor}}A\big{)}\geq\big{(}\mu(A)\big{)}^{k+1}.$

######  Corollary 1.9.

For any $k\in\mathbb{N},$ set $E\subseteq\mathbb{N}$ of positive upper
density, Hardy field $\mathcal{H}$ and functions
$a_{1},\dots,a_{k}\in\mathcal{H}$ as in Theorem 1.8, we have

$\liminf\limits_{N\to+\infty}\frac{1}{\pi(N)}\sum_{p\in\mathbb{P}{:}\;p\leq
N}\bar{d}\big{(}E\cap(E-{\left\lfloor
a_{1}(p)\right\rfloor})\cap\dots\cap(E-{\left\lfloor
a_{k}(p)\right\rfloor})\big{)}\geq\big{(}\bar{d}(E)\big{)}^{k+1}.$

In particular, we conclude that for any set $E\subseteq\mathbb{N}$ with
positive upper density and $a_{1},\dots,a_{k}$ as above, the set

$\\{n\in\mathbb{N}{:}\;\text{ there exists }m\in\mathbb{N}\text{ such that
}m,m+{\left\lfloor a_{1}(n)\right\rfloor},\ldots,m+{\left\lfloor
a_{k}(n)\right\rfloor}\in E\\}$

has non-empty intersection with the set $\mathbb{P}$.

The following is a multidimensional analog of Theorem 1.8 and relies on the
convergence result of Theorem 1.5.

######  Theorem 1.10.

Let $k\in\mathbb{N},$ $\mathcal{H}$ be a shift-invariant Hardy field and
suppose that $a_{1},\dots,a_{k}\in\mathcal{H}$ are functions of polynomial
growth that satisfy the hypotheses of Theorem 1.5. Then, for any system
$(X,\mathcal{X},\mu,T_{1},\dots,T_{k})$ and set $A$ with positive measure, we
have that

$\lim\limits_{N\to+\infty}\frac{1}{\pi(N)}\sum_{p\in\mathbb{P}{:}\;p\leq
N}\mu\big{(}A\cap T_{1}^{-{\left\lfloor a_{1}(p)\right\rfloor}}A\cap\dots\cap
T_{k}^{-{\left\lfloor
a_{k}(p)\right\rfloor}}A\big{)}\geq\big{(}\mu(A)\big{)}^{k+1}.$

Lastly, we present the corresponding combinatorial application of our last
multiple recurrence result. We recall that for a set
$E\subseteq\mathbb{Z}^{d},$ its _upper density_ is given by

$\bar{d}(E):=\limsup_{N\to+\infty}\frac{|E\cap\\{-N,\ldots,N\\}^{d}|}{(2N)^{d}}.$

######  Corollary 1.11.

For any $k\in\mathbb{N},$ set $E\subseteq\mathbb{Z}^{d}$ of positive upper
density, Hardy field $\mathcal{H}$ and functions
$a_{1},\dots,a_{k}\in\mathcal{H}$ as in Theorem 1.10 and vectors ${\bf
v}_{1},\ldots,{\bf v}_{k}\in\mathbb{Z}^{d}$, we have

$\liminf\limits_{N\to+\infty}\frac{1}{\pi(N)}\sum_{p\in\mathbb{P}{:}\;p\leq
N}\bar{d}\big{(}E\cap(E-{\left\lfloor a_{1}(p)\right\rfloor}{\bf
v}_{1})\cap\dots\cap(E-{\left\lfloor a_{k}(p)\right\rfloor}{\bf
v}_{k})\big{)}\geq\big{(}\bar{d}(E)\big{)}^{k+1}.$

######  Comment.

Once again, we remark that in the recurrence results in both Theorem 1.8 and
Theorem 1.10 and the corresponding corollaries, one can replace $p$ with any
other affine shift $ap+b$ with $a,b\in\mathbb{Q}$ $(a\neq 0),$ as we explained
in Remark 3. In addition, one can replace the floor functions with either
$\lceil\cdot\rceil$ or $[[\cdot]]$.

####  1.2.4. Equidistribution in nilmanifolds

In this part, we present some results relating to pointwise convergence in
nilmanifolds along Hardy sequences evaluated at primes. We have the following
theorem that is similar in spirit to Theorem 1.2.

######  Theorem 1.12.

Let $k$ be a positive integer. Assume that $a_{1},\dots,a_{k}\in\mathcal{H}$
are functions of polynomial growth, such that the following conditions are
satisfied:
(a) For every $1\leq i\leq k$, the function $a_{i}(t)$ satisfies either
$\eqref{E: far away from rational polynomials}$ or (8).
(b) For all positive integers $W,b$, any nilmanifold $Y=H/\Delta$, pairwise
commuting elements $u_{1},\dots,u_{k}$ and points $y_{1},\dots,y_{k}\in Y$,
the sequence

$\Big{(}u_{1}^{{\left\lfloor
a_{1}(Wn+b)\right\rfloor}}y_{1},\ldots,u_{k}^{{\left\lfloor
a_{k}(Wn+b)\right\rfloor}}y_{k}\Big{)}$

is equidistributed on the nilmanifold
$\overline{(u_{1}^{\mathbb{Z}}y_{1})}\times\dots\times\leavevmode\nobreak\
\overline{(u_{k}^{\mathbb{Z}}y_{k})}$.

Then, for any nilmanifold $X=G/\Gamma$, pairwise commuting elements
$g_{1},\dots,g_{k}\in G$ and points $x_{1},\dots,x_{k}\in X$, the sequence

$\Big{(}g_{1}^{{\left\lfloor
a_{1}(p_{n})\right\rfloor}}x_{1},\dots,g_{k}^{{\left\lfloor
a_{k}(p_{n})\right\rfloor}}x_{k}\Big{)}_{n\in\mathbb{N}},$

where $p_{n}$ denotes the $n$-th prime, is equidistributed on the nilmanifold
$\overline{(g_{1}^{\mathbb{Z}}x_{1})}\times\dots\times\leavevmode\nobreak\
\overline{(g_{k}^{\mathbb{Z}}x_{k})}$.

Instead of the “pointwise convergence” assumption (b), one can replace it with
a weaker convergence (i.e. in the $L^{2}$-sense) hypothesis. However, we will
not benefit from this in applications, so we opt to not state our results in
that setup.

In the case of a polynomial function, a convergence result along primes
follows by combining [22, Theorem 7.1] (which is the case of linear
polynomials) and the fact that any polynomial orbit on a nilmanifold can be
lifted to a linear orbit of a unipotent affine transformation on a larger
nilmanifold (an argument due to Leibman [33]). Nonetheless, in this case, we
do not have a nice description for the orbit of this polynomial sequence.

On the other hand, equidistribution results in higher-step nilmanifolds (along
primes) for sequences such as ${\left\lfloor n^{c}\right\rfloor}$, with $c$ a
non-integer ($c>1$), are unknown even in the simplest case of one fractional
power. Theorem 1.12 will allow us to obtain the first results in this
direction from the corresponding results along $\mathbb{N}$. Equidistribution
results for Hardy sequences along $\mathbb{N}$ were obtained originally by
Frantzikinakis in [9], while more recently new results were established by
Richter [39] and the second author [43]. In view of the structure theory of
Host-Kra [26], results of this nature are essential to demonstrate that the
corresponding multiple ergodic averages along $\mathbb{N}$ converge in
$L^{2}(\mu)$. All of the pointwise convergence theorems that we mentioned
above can be transferred to the prime setting. As an application, we state the
following sample corollary of Theorem 1.12. The term invariant under affine
shifts refers to a Hardy field $\mathcal{H}$ for which $a(Wt+b)\in\mathcal{H}$
whenever $a\in\mathcal{H}$, for all $W,b\in\mathbb{N}$.

######  Corollary 1.13.

Let $k$ be a positive integer, $\mathcal{H}$ be a Hardy field invariant under
affine shifts, and suppose that $a_{1},\dots,a_{k}\in\mathcal{H}$ are
functions of polynomial growth, for which there exists an $\varepsilon>0$, so
that every non-trivial linear combination $a$ of them satisfies

(16)
$\lim\limits_{t\to+\infty}\Bigl{|}\frac{a(t)-q(t)}{t^{\varepsilon}}\Bigr{|}=+\infty\text{
for every }q(t)\in\mathbb{Z}[t].$

Then, for any collection of nilmanifolds $X_{i}=G_{i}/\Gamma_{i}$
$i=1,\dots,k$, elements $g_{i}\in G_{i}$ and points $x_{i}\in X_{i}$, the
sequence

$\big{(}g_{1}^{{\left\lfloor
a_{1}(p_{n})\right\rfloor}}x_{1},\ldots,g_{k}^{{\left\lfloor
a_{k}(p_{n})\right\rfloor}}x_{k}\big{)}_{n\in\mathbb{N}},$

where $p_{n}$ denotes the $n$-th prime, is equidistributed on the nilmanifold
$\overline{(g_{1}^{\mathbb{Z}}x_{1})}\times\dots\times\leavevmode\nobreak\
\overline{(g_{k}^{\mathbb{Z}}x_{k})}$.

The assumption in (16) is a byproduct of the corresponding equidistribution
result along $\mathbb{N}$ proven in [43]. Also, the assumption on
$\mathcal{H}$ can be dropped since the arguments in [43] rely on some growth
assumptions on the functions $a_{i}$ which translate over to their shifted
versions. We choose not to remove the assumption here since the results in
[43] are not stated in this setup.

Our corollary implies that the sequence

$\big{(}g_{1}^{{\left\lfloor
p_{n}^{c_{1}}\right\rfloor}}x_{1},\ldots,g_{k}^{{\left\lfloor
p_{n}^{c_{k}}\right\rfloor}}x_{k}\big{)}$

is equidistributed on the subnilmanifold
$\overline{(g_{1}^{\mathbb{Z}}x_{1})}\times\dots\times\leavevmode\nobreak\
\overline{(g_{k}^{\mathbb{Z}}x_{k})}$ of $X_{1}\times\dots\times X_{k}$, for
any distinct positive non-integers $c_{1},\dots,c_{k}$ and for all points
$x_{i}\in X_{i}$. This is stronger than the result of Frantzikinakis [13] that
establishes convergence in the $L^{2}$-sense (for linearly independent
fractional polynomials). This result is novel even in the simplest case $k=1$.
Furthermore, we remark that in the case $k=1$ we can actually replace (16)
with the optimal condition that $a(t)-q(t)$ grows faster than $\log t$, for
all $q(t)$ that are real multiples of integer polynomials, using the results
from [9].

###  1.3. Strategy of the proof and organization

The bulk of the paper is spent on establishing the asserted comparison between
the $W$-tricked averages and the standard Cesàro averages (Theorem 1.1). The
main trick is to recast our problem to the setting where our averages range
over a short interval of the form $[N,N+L(N)]$, where $L(t)$ is a function of
sub-linear growth chosen so that Hardy sequences are approximated sufficiently
well by polynomials in these intervals. Naturally, the study of the primes in
short intervals requires strong number theoretic input and this is provided by
the recent result in [36] on the Gowers uniformity of several arithmetic
functions in short intervals (this is Theorem A in the following section). The
strategy of restricting ergodic averages to short intervals was first used by
Frantzikinakis in [10] to demonstrate the convergence of the averages in (2)
when $a(n)$ is a Hardy sequence and then amplified further by the second
author in [44] to resolve the problem in the more general setting of the
averages in (1) (for one transformation). Certainly, the uniformity estimate
in Theorem A requires that the interval is not too short, but it was observed
in [44] that one can take the function $L(t)$ to grow sufficiently fast, as
long as one is willing to tolerate polynomial approximations with much larger
degrees.

After this step has been completed, one typically employs a complexity
reduction argument (commonly referred to as PET induction in the literature)
that relies on repeated applications of the van der Corput inequality. Using
this approach, one derives iterates that are comprised of several expressions
with integer parts, which are then assembled together using known identities
for the floor function (with an appropriate error). This approach was used for
the conventional averages over $\mathbb{N}$ in [10] and [44], because one can
sloppily combine integer parts in the iterates at the cost of inserting a
bounded weight in the corresponding averages. To be more precise, this weight
is actually the characteristic function of a subset of $\mathbb{N}$. However,
we cannot afford to do this blindly in our setting, since there is no
guarantee that this subset of $\mathbb{N}$ does not correlate very strongly
with $\Lambda_{w,b}(n)-1$, which could imply that the resulting average is
large. The fact that the weight $\Lambda_{w,b}-1$ is unbounded complicates
this step as well. Nonetheless, it was observed in [29] (using an argument
from [30]),888 This argument was first used for $k=1$ in [5] and [35] to prove
that when a sequence of real positive numbers is good for (single term)
pointwise convergence, then its floor value is also good. The method was later
adapted to the $k=2$ setting by Wierdl (personal communication with the first
author, 2015). that if the fractional parts of the sequences in the iterates
do not concentrate heavily around 1, then one can pass to an extension of the
system $(X,\mathcal{X},\mu,T_{1},\dots,T_{k})$, wherein the actions $T_{i}$
are lifted to $\mathbb{R}$-actions (also called measure-preserving flows) and
the integer parts are removed. Since there are no nuisances with combining
rounding functions in the iterates, one can then run the complexity reduction
argument in the new system and obtain the desired bounds.

Unfortunately, there is still an obstruction in this approach arising from the
fact that the flows in the extension are not continuous. To be more precise,
let us assume that we derived an approximation of the form
$a(n)=p_{N}(n)+\varepsilon_{N}(n)$, where $n\in[N,N+L(N)]$, $p_{N}(n)$ is a
Taylor polynomial and $\varepsilon_{N}(n)$ is the remainder term. The PET
induction can eliminate the polynomials $p_{N}(n)$, by virtue of the simple
observation that taking sufficiently many “discrete derivatives” makes a
polynomial vanish. However, this procedure cannot eliminate the error term
$\varepsilon_{N}(n)$ at all and the fact that the flow is not continuous
prohibits us from replacing them with zero. Thus, we take action to discard
$\varepsilon_{N}(n)$ beforehand. This is done by studying the equidistribution
properties of the polynomial $p_{N}(n)$ in the prior approximation, using
standard results from the equidistribution theory of finite polynomial orbits
due to Weyl. Practically, we show that for “almost all” values of $n$ in the
interval $[N,N+L(N)]$, we can write ${\left\lfloor
p_{N}(n)+\varepsilon_{N}(n)\right\rfloor}={\left\lfloor
p_{N}(n)\right\rfloor}$, so that the error $\varepsilon_{N}(n)$ can be removed
from the expressions in the iterates.

In our approach, some equidistribution assumptions on our original functions
are required. This clarifies the conditions on Theorem 1.1. Indeed, (7)
implies that the sequence $\big{(}a_{ij}(n)\big{)}_{n}$ is equidistributed
modulo 1 (due to Theorem D), while condition (8) implies that the function
$a_{ij}(t)$ is essentially equal to a polynomial with rational coefficients
(thus periodic modulo 1).

####  1.3.1. A simple example

We demonstrate the methods discussed above in a basic case that avoids most
complications that appear in the general setting. Even this simple case,
however, is not covered by prior methods in the literature. We will use some
prerequisites from the following section, such as Theorem A.

We consider the averages

(17) $\frac{1}{\pi(N)}\sum_{p\in\mathbb{P}:\;p\leq N}T^{{\left\lfloor
p^{3/2}\right\rfloor}}f_{1}\cdot T^{2{\left\lfloor
p^{3/2}\right\rfloor}}f_{2},$

where $(X,\mathcal{X},\mu,T)$ is a system and $f_{1},f_{2}\in
L^{\infty}(\mu)$. For every $1\leq b\leq W$ with $(b,W)=1$, we study the
averages

(18)
$\frac{1}{N}\sum_{n=1}^{N}\big{(}\Lambda_{w,b}(n)-1\big{)}T^{{\left\lfloor
n^{3/2}\right\rfloor}}f_{1}\cdot T^{2{\left\lfloor
n^{3/2}\right\rfloor}}f_{2},$

which is the required comparison for the averages in (17). We will show that
as $N\to+\infty$ and then $w\to+\infty$, the norm of this average converges to
0 uniformly in $b$.

We set $L(t)=t^{0.65}$. Notice that $L(t)$ grows faster than $t^{5/8}$, which
is a necessary condition to use Theorem A. In order to establish the required
convergence for the averages in (18), it suffices to show that

(19)
$\limsup\limits_{r\to+\infty}\Big{\lVert}\operatorname*{\mathbb{E}}_{r\leq
n\leq r+L(r)}\big{(}\Lambda_{w,b}(n)-1\big{)}T^{{\left\lfloor
n^{3/2}\right\rfloor}}f_{1}\cdot T^{2{\left\lfloor
n^{3/2}\right\rfloor}}f_{2}\Big{\rVert}_{L^{2}(\mu)}=o_{w}(1)$

uniformly in $b$. We remark that in the more general case that encompasses
several functions, we will need to average over the parameter $r$ as well and,
thus, we are dealing with a double-averaging scheme. This reduction is the
content of Lemma 5.1.

Using the Taylor expansion around $r$, we can write for every $0\leq h\leq
L(r)$:

$(r+h)^{3/2}=r^{3/2}+\frac{3r^{1/2}h}{2}+\frac{3h^{2}}{8r^{1/2}}-\frac{3h^{3}}{48\xi^{3/2}_{h}},\
\text{ where }\xi_{h}\in[r,r+h].$

Observe that the error term is smaller than a constant multiple of

$\frac{\big{(}L(r)\big{)}^{3}}{r^{3/2}}=o_{r}(1).$

We show that we have

${\left\lfloor(r+h)^{3/2}\right\rfloor}={\left\lfloor
r^{3/2}+\frac{3r^{1/2}h}{2}+\frac{3h^{2}}{8r^{1/2}}\right\rfloor}$

for “almost all” $0\leq h\leq L(r)$, in the sense that the number of $h$’s
that do not obey this relation is bounded by a constant multiple of
$L(r)\log^{-100}r$ (say). Thus, their contribution on the average is
negligible, since the sequence $\Lambda_{w,b}$ has size comparable to $\log
r$.

Let us denote by $p_{r}(h)$ the quadratic polynomial in the Taylor expansion
above. In order to establish this assertion, we will investigate the
discrepancy of the finite sequence $\big{(}p_{r}(h)\big{)}_{0\leq h\leq
L(r)}$, using some exponential sum estimates and the Erdős-Turán inequality
(Theorem E). This is the content of Proposition 4.4.

Assuming that all the previous steps were completed, we shall ultimately
reduce our problem to showing that

$\limsup\limits_{r\to+\infty}\Big{\lVert}\operatorname*{\mathbb{E}}_{0\leq
h\leq L(r)}\big{(}\Lambda_{w,b}(r+h)-1\big{)}T^{{\left\lfloor
p_{r}(h)\right\rfloor}}f_{1}\cdot T^{2{\left\lfloor
p_{r}(h)\right\rfloor}}f_{2}\Big{\rVert}_{L^{2}(\mu)}=o_{w}(1)$

uniformly for $1\leq b\leq W$ coprime to $W$. Now that the error terms have
been eliminated, we are left with an average that involves polynomial
iterates. Next, we use an argument from [30] that allows us to pass to an
extension of the system $(X,\mathcal{X},\mu,T)$. To be more precise, there
exists an $\mathbb{R}$-action (see the definition in Section 2)
$(Y,\mathcal{Y},v,S)$ and functions $\widetilde{f}_{1},\widetilde{f}_{2}$,
such that we have the equality

$T^{{\left\lfloor p_{r}(h)\right\rfloor}}f_{1}\cdot T^{2{\left\lfloor
p_{r}(h)\right\rfloor}}f_{2}=S_{p_{r}(h)}\widetilde{f}_{1}\cdot
S_{2p_{r}(h)}\widetilde{f}_{2}.$

This procedure can be done because the polynomial $p_{r}(h)$ has good
equidistribution properties (which we analyze in the previous step) and thus
the fractional parts of the finite sequence $\big{(}p_{r}(h)\big{)}_{0\leq
h\leq L(r)}$ fall inside a small interval around 1 with the correct frequency.
This is a necessary condition in order to use Proposition 3.1, which provides
a bound for the inner average. To be more specific, we have the expression

$\limsup\limits_{r\to+\infty}\Big{\lVert}\operatorname*{\mathbb{E}}_{0\leq
h\leq
L(r)}\big{(}\Lambda_{w,b}(r+h)-1\big{)}S_{p_{r}(h)}\widetilde{f}_{1}\cdot
S_{2p_{r}(h)}\widetilde{f}_{2}\Big{\rVert}_{L^{2}(\mu)}.$

The inner average involves polynomials and can be bounded uniformly by the
Gowers norm of the sequence $\Lambda_{w,b}(n)-1$ by Proposition 3.1 (modulo
some constants and error terms that we ignore for the sake of this
discussion). In particular, we have that the average in (19) is bounded by

$\big{\lVert}\Lambda_{w,b}(n)-1\big{\rVert}_{U^{s}(r,r+L(r)]}$

for some $s\in\mathbb{N}$. Finally, Theorem A implies that for sufficiently
large values of $r$ we have
$\big{\lVert}\Lambda_{w,b}(n)-1\big{\rVert}_{U^{s}(r,r+L(r)]}$ is $o_{w}(1)$
uniformly in $b$. Finally, sending $w$ to $+\infty$, we reach the desired
conclusion.

This argument is quite simpler than the general case since it involves only
one function. As we commented briefly, one extra complication is that we are
dealing with a double averaging, unlike the model example. During the proof of
Theorem 1.1, we will also need to split the functions $a_{ij}$ into several
distinct classes, which are handled with different methods. For example, the
argument above works nicely for the function $t^{3/2}$ but has to be modified
in the case of the function $\log^{2}t$, because the latter cannot be
approximated by polynomials of degree 1 or higher on our short intervals.
Namely, the Taylor polynomial corresponding to $\log^{2}t$ is constant and the
previous method is orendered ineffective. Thus, we present an additional, more
elaborate model example in Section 4, which exemplifies the possible cases
that arise in the main proof.

###  1.4. Open problems and further directions

We expect that condition (11) in Theorem 1.6 can be relaxed significantly and
still provide a multiple recurrence result. Motivated by [10, Theorem 2.3], we
make the following conjecture.

######  Conjecture 1.

Let $a\in\mathcal{H}$ be a function of polynomial growth which satisfies

$\lim\limits_{t\to+\infty}\bigl{|}a(t)-cp(t)\bigr{|}=+\infty\text{ for every
}c\in\mathbb{R}\text{ and }p(t)\in\mathbb{Z}[t].$

Then, for any $k\in\mathbb{N},$ measure-preserving system
$(X,\mathcal{X},\mu,T)$ and set $A$ of positive measure, the set

$\\{n\in\mathbb{N}:\;\mu\big{(}A\cap T^{-{\left\lfloor
a(n)\right\rfloor}}A\cap\dots\cap T^{-k{\left\lfloor
a(n)\right\rfloor}}A\big{)}>0\\}$

has non-empty intersection with $\mathbb{P}$.

Comparing the assumptions on the function $a$ to those in Theorem 1.6, we see
that we are very close to establishing Conjecture 1. However, there are
examples that our work does not encompass, such as the function $t^{4}+\log t$
or $t^{2}+\log\log(5t)$. In the setting of multiple recurrence along
$\mathbb{N}$, the corresponding result was established in [10] and was
generalized for more functions in [3]. In view of [3, Corollary B.3, Corollary
B.4], we also make the following conjecture:

######  Conjecture 2.

Let $k\in\mathbb{N}$ and $a_{1},\dots,a_{k}\in\mathcal{H}$ be functions of
polynomial growth. Assume that every non-trivial linear combination $a$ of the
functions $a_{1},\dots,a_{k}$, $a,$ has the property

$\lim_{t\to+\infty}|a(t)-p(t)|=+\infty\text{ for all }p(t)\in\mathbb{Z}[t].$

Then, for any measure-preserving system $(X,\mathcal{X},\mu,T)$ and set $A$ of
positive measure, the set

$\\{n\in\mathbb{N}:\;\mu\big{(}A\cap T^{-{\left\lfloor
a_{1}(n)\right\rfloor}}A\cap\dots\cap T^{-{\left\lfloor
a_{k}(n)\right\rfloor}}A\big{)}>0\\}$

has non-empty intersection with $\mathbb{P}$.

We remark that if one wants to also include functions that are essentially
equal to a polynomial, then there are more results in this direction in [3],
where it was shown that a multiple recurrence result for functions that are
approximately equal to jointly-intersective polynomials is valid. Certainly,
one would need to work with the sets $\mathbb{P}+1$ or $\mathbb{P}-1$ in this
setting to transfer this result from $\mathbb{N}$ to the primes.

It is known that a convergence result along $\mathbb{N}$ with typical Cesàro
averages cannot be obtained, if one works with the weaker conditions of the
previous two conjectures. Indeed, the result would fail even for rotations on
tori, because the corresponding equidistribution statement is false. The main
approach employed in [3] was to consider a weaker averaging scheme than Cesàro
averages. Using a different averaging method, one can impose some
equidistribution assumption on functions that are not equidistributed in the
standard sense. For instance, it is well-known that the sequence $(\log
n)_{n\in\mathbb{N}}$ is not equidistributed mod 1 using Cesàro averages, but
it is equidistributed under logarithmic averaging. Thus, it is natural to
expect that an analog of Theorem 1.1 for other averaging schemes would allow
someone to relax the conditions (7) and (8) in order to tackle the previous
conjectures. A comparison result similar to Theorem 1.1 (but for other
averaging schemes) appears to be a potential first step in this problem.

We expect that, under the same hypotheses, the analogous result in the setting
of multiple commuting transformations will also hold. In particular, aside
from the special cases established in [11], convergence results along
$\mathbb{N}$ for Hardy sequences and commuting transformations are still open.
For instance, it is unknown whether the averages in Theorem 1.5 converge when
the functions $a_{i}$ are linear combinations of fractional powers. In view of
Theorem 1.1 and Theorem 1.2, any new result in this direction can be
transferred to the setting of primes in a rather straightforward fashion,
since conditions (7) and (8) are quite general to work with.

###  1.5. Acknowledgements

We thank Nikos Frantzikinakis for helpful discussions.

###  1.6. Notational conventions

Throughout this article, we denote with $\mathbb{N}=\\{1,2,\ldots\\},$
$\mathbb{Z},$ $\mathbb{Q},$ $\mathbb{R},$ and $\mathbb{C}$ the sets of
natural, integer, rational, real, and complex numbers respectively. We denote
the one dimensional torus $\mathbb{T}=\mathbb{R}/\mathbb{Z}$, the exponential
phases $e(t)=e^{2\pi it}$, while
$\left\|x\right\|_{\mathbb{T}}=d(x,\mathbb{Z}),$ $[[x]],$ ${\left\lfloor
x\right\rfloor},$ $\lceil x\rceil,$ and $\\{x\\}$ are the distance of $x$ from
the nearest integer, the nearest integer to $x,$ the greatest integer which is
less or equal to $x,$ the smallest integer which is greater or equal to $x,$
and the fractional part of $x$ respectively. We also let ${\bf 1}_{A}$ denote
the characteristic function of a set $A$ and $|A|$ is its cardinality.

For any integer $Q$ and $0\leq a\leq Q-1$, we use the symbol $a\;(Q)$ to
denote the residue class $a$ modulo $Q$. Therefore, the notation ${\bf
1}_{a\;(Q)}$ refers to the characteristic function of the set of those
integers, whose residue when divided by $Q$ is equal to $a$.

For two sequences $a_{n},b_{n}$, we say that $b_{n}$ dominates $a_{n}$ and
write $a_{n}\prec b_{n}$ or $a_{n}=o(b_{n})$, when $a_{n}/b_{n}$ goes to 0, as
$n\to+\infty$. In addition, we write $a_{n}\ll b_{n}$ or $a_{n}=O(b_{n})$, if
there exists a positive constant $C$ such that $|a_{n}|\leq C|b_{n}|$ for
large enough $n$. When we want to denote the dependence of the constant $C$ on
some parameters $h_{1},\dots,h_{k}$, we will use the notation
$a_{n}=O_{h_{1},\dots,h_{k}}(b_{n})$. In the case that $b_{n}\ll a_{n}\ll
b_{n}$, we shall write $a_{n}\sim b_{n}$. We say that $a_{n}$ and $b_{n}$ have
the same growth rate when the limit of $\frac{a_{n}}{b_{n}}$, as $n\to+\infty$
exists and is a non-zero real number. We use a similar notation and
terminology for asymptotic relations when comparing functions of a real
variable $t$.

Under the same setup as in the previous paragraph, we say that the sequence
$a_{n}$ strongly dominates the sequence $b_{n}$ if there exists $\delta>0$
such that

$\frac{a_{n}}{b_{n}}\gg n^{\delta}.$

In this case, we write $b_{N}\lll a_{N}$, or $a_{N}\ggg b_{N}$.999This
notation is non-standard, so we may refer back to this part quite often
throughout the text. We use similar terminology and notation for functions on
a real variable $t$.

Finally, for any sequence $(a(n))$, we employ the notation

$\operatorname*{\mathbb{E}}_{n\in S}a(n)=\frac{1}{|S|}\sum_{n\in S}a(n)$

to denote averages over a finite non-empty set $S$. We will typically work
with averages over the integers in a specified interval, whose endpoints will
generally be non-integers. We shall avoid using this notation for the Cesàro
averages.

##  2\. Background

###  2.1. Measure-preserving actions

Let $(X,\mathcal{X},\mu)$ be a Lebesgue probability space. A transformation
$T:X\to X$ is measure-preserving if $\mu(T^{-1}(A))=\mu(A)$ for all
$A\in\mathcal{X}$. It is called ergodic if all the $T$-invariant functions are
constant. If $T$ is invertible, then $T$ induces a $\mathbb{Z}$-action on $X$
by $(n,x)=T^{n}x$, for every $n\in\mathbb{Z}$ and $x\in X$.

More generally, let $G$ be a group. A measure-preserving $G$-action on a
Lebesgue probability space $(X,\mathcal{X},\mu)$ is an action on $X$ by
measure-preserving maps $T_{g}$ for every $g\in G$ such that, for all
$g_{1},g_{2}\in G$, we have $T_{g_{1}g_{2}}=T_{g_{1}}\circ T_{g_{2}}$. For the
purposes of this article, we will only need to consider actions by the
additive groups of $\mathbb{Z}$ or $\mathbb{R}$. Throughout the following
sections, we will also refer to $\mathbb{R}$-actions as measure-preserving
flows. In the case of $\mathbb{Z}$-actions, we follow the usual notation and
write $T^{n}$ to indicate the map $T_{n}$.

###  2.2. Hardy fields

Let $(\mathcal{B},+,\cdot)$ denote the ring of germs at infinity of real-
valued functions defined on a half-line $(t_{0},+\infty)$. A sub-field
$\mathcal{H}$ of $\mathcal{B}$ that is closed under differentiation is called
a Hardy field. For any two functions $f,g\in\mathcal{H}$, with $g$ not
identically zero, the limit

$\lim\limits_{t\to+\infty}\frac{f(t)}{g(t)}$

exists in the extended line and thus we can always compare the growth rates of
two functions in $\mathcal{H}$. In addition, every non-constant function in
$\mathcal{H}$ is eventually monotone and has a constant sign eventually. We
define below some notions that will be used repeatedly throughout the
remainder of the paper.

######  Definition 2.1.

Let $a$ be a function in $\mathcal{H}$. We say that the function $a$ has
polynomial growth if there exists a positive integer $k$ such that $a(t)\ll
t^{k}$. The smallest positive integer $k$ for which this holds will be called
the degree of $a$. The function $a$ is called sub-linear if $a(t)\prec t$. It
will be called sub-fractional if $a(t)\prec t^{\varepsilon}$, for all
$\varepsilon>0$. Finally, we will say that $a$ is strongly non-polynomial if,
for all positive integers $k$, we have that the functions $a(t)$ and $t^{k}$
have distinct growth rates.

Throughout the proofs in the following sections, we will assume that we have
fixed a Hardy field $\mathcal{H}$. Some of the theorems impose certain
additional assumptions on $\mathcal{H}$, but this is a byproduct of the
arguments used to establish the case of convergence of Cesàro averages in [44]
and we will not need to use these hypotheses in any of our arguments.

###  2.3. Gowers uniformity norms on intervals of integers

Let $N$ be a positive integer and let $f:\mathbb{Z}_{N}\to\mathbb{C}$ be a
function. For any positive integer $s$, we define the Gowers uniformity norm
$\left\|f\right\|_{U^{s}(\mathbb{Z}_{N})}$ inductively by

$\big{\lVert}f\big{\rVert}_{U^{1}(\mathbb{Z}_{N})}=\bigl{|}\operatorname*{\mathbb{E}}_{n\in\mathbb{Z}_{N}}\
f(n)\bigr{|}$

and for $s\geq 2$,

$\big{\lVert}f\big{\rVert}_{U^{s}(\mathbb{Z}_{N})}^{2^{s}}=\operatorname*{\mathbb{E}}_{h\in\mathbb{Z}_{N}}\big{\lVert}\overline{f(\cdot)}f(\cdot+h)\big{\rVert}_{U^{s-1}(\mathbb{Z}_{N})}^{2^{s-1}}.$

A straightforward computation implies that

$\big{\lVert}f\big{\rVert}_{U^{s}(\mathbb{Z}_{N})}=\Big{(}\operatorname*{\mathbb{E}}_{{\underline{h}}\in\mathbb{Z}_{N}^{s}}\operatorname*{\mathbb{E}}_{n\in\mathbb{Z}_{N}}\prod_{{\underline{\varepsilon}}\in\\{0,1\\}^{s}}\mathcal{C}^{|{\underline{\varepsilon}}|}f(n+{\underline{h}}\cdot{\underline{\varepsilon}})\Big{)}^{\frac{1}{2^{s}}}.$

Here, the notation $\mathcal{C}$ denotes the conjugation map in $\mathbb{C}$,
whereas for ${\underline{\varepsilon}}\in\\{0,1\\}^{s}$,
$|{\underline{\varepsilon}}|$ is the sum of the entries of
${\underline{\varepsilon}}$ (the number of coordinates equal to $1$).

It can be shown that for $s\geq 2$,
$\left\|\cdot\right\|_{U^{s}(\mathbb{Z}_{N})}$ is a norm and that

$\left\|f\right\|_{U^{s}(\mathbb{Z}_{N})}\leq\left\|f\right\|_{U^{s+1}(\mathbb{Z}_{N})}$

for any function $f$ on $\mathbb{Z}_{N}$ [27, Chapter 6]. For the purposes of
this article, it will be convenient to consider similar expressions that are
not necessarily defined only for functions in an abelian group
$\mathbb{Z}_{N}$. Therefore, for any $s\geq 1$ and a finitely supported
sequence $f(n),n\in\mathbb{Z}$, we define the unnormalized Gowers uniformity
norm

(20)
$\big{\lVert}f\big{\rVert}_{U^{s}(\mathbb{Z})}=\Big{(}\sum_{{\underline{h}}\in\mathbb{Z}^{s}}\
\sum_{n\in\mathbb{Z}}\
\prod_{{\underline{\varepsilon}}\in\\{0,1\\}^{s}}\mathcal{C}^{|{\underline{\varepsilon}}|}f(n+{\underline{h}}\cdot{\underline{\varepsilon}})\Big{)}^{\frac{1}{2^{s}}}$

and for a bounded interval $I\subset{\mathbb{R}}$, we define

(21) $\big{\lVert}f\big{\rVert}_{U^{s}(I)}=\frac{\big{\lVert}f\cdot{\bf
1}_{I}\big{\rVert}_{U^{s}(\mathbb{Z})}}{\big{\lVert}{\bf
1}_{I}\big{\rVert}_{U^{s}(\mathbb{Z})}}.$

First of all, observe that a simple change of variables in the summation in
(21) implies that for $X\in\mathbb{Z}$

$\big{\lVert}f\big{\rVert}_{U^{s}(X,X+H]}=\big{\lVert}f(\cdot+X)\big{\rVert}_{U^{s}[1,H]}.$

Evidently, we want to compare uniformity norms on the interval $[1,H]$ with
the corresponding norms on the abelian group $\mathbb{Z}_{H}$. To this end, we
will use the following lemma, whose proof can be found in [27, Chapter 22,
Proposition 11].

######  Lemma 2.2.

Let $s$ be a positive integer and $N,N^{\prime}\in\mathbb{N}$ with
$N^{\prime}\geq 2N$. Then, for any sequence
$\big{(}f(n)\big{)}_{n\in\mathbb{Z}}$, we have

$\big{\lVert}f\big{\rVert}_{U^{s}[1,N]}=\frac{\big{\lVert}f\cdot
1_{[1,N]}\big{\rVert}_{U^{s}(\mathbb{Z}_{N^{\prime}})}}{\big{\lVert}1_{[1,N]}\big{\rVert}_{U^{s}(\mathbb{Z}_{N^{\prime}})}}.$

We will need a final lemma that implies that the Gowers uniformity norm is
smaller when the sequence is evaluated along arithmetic progressions.

######  Lemma 2.3.

Let $u(n)$ be a sequence of complex numbers. Then, for any integer $s\geq 2$
and any positive integers $0\leq a\leq Q-1$, we have

$\big{\lVert}u(n){\bf
1}_{a\;(Q)}(n)\big{\rVert}_{U^{s}(X,X+H]}\leq\big{\lVert}u(n)\big{\rVert}_{U^{s}(X,X+H]},$

for all integers $X\geq 0$ and all $H\geq 1$.

###### Proof.

We set $u_{X}(n)=u(X+n)$, so that we can rewrite the norm on the left-hand
side as $\big{\lVert}u_{X}(n){\bf 1}_{a\;(Q)}(X+n)\big{\rVert}_{U^{s}[1,H]}$.
Observe that the function ${\bf 1}_{a\;(Q)}(n)$ is periodic modulo $Q$. Thus,
treating it as a function in $\mathbb{Z}_{Q}$, we have the Fourier expansion

${\bf 1}_{a\;(Q)}(n)=\sum_{\xi\in\mathbb{Z}_{q}}\widehat{{\bf
1}}_{a\;(Q)}(\xi)e\Big{(}\frac{n\xi}{Q}\Big{)},$

for every $0\leq n\leq Q-1$, and this can be extended to hold for all
$n\in\mathbb{Z}$ due to periodicity. Furthermore, we have the bound

$\bigl{|}\widehat{{\bf
1}}_{a\;(Q)}(\xi)\bigr{|}=\frac{1}{Q}\Bigl{|}e\bigg{(}\frac{a\xi}{Q}\bigg{)}\Bigr{|}\leq\frac{1}{Q}.$

Applying the triangle inequality, we deduce that

$\big{\lVert}u_{X}(n){\bf
1}_{a\;(Q)}(X+n)\big{\rVert}_{U^{s}[1,H]}\leq\sum_{\xi\in\mathbb{Z}_{Q}}\bigl{|}\widehat{{\bf
1}}_{a\;(Q)}(\xi)\bigr{|}\cdot\Big{\lVert}u_{X}(n)e\Big{(}\frac{(X+n)\xi}{Q}\Big{)}\Big{\rVert}_{U^{s}[1,H]}.$

However, it is immediate from (20) that the $U^{s}$-norm is invariant under
multiplication by linear phases, for every $s\geq 2$. Therefore, we conclude
that

$\big{\lVert}u_{X}(n){\bf
1}_{a\;(Q)}(X+n)\big{\rVert}_{U^{s}[1,H]}\leq\big{\lVert}u_{X}(n)\big{\rVert}_{U^{s}[1,H]}=\big{\lVert}u(n)\big{\rVert}_{U^{s}(X,X+H]},$

which is the desired result. ∎

The primary utility of the Gowers uniformity norms is the fact that they arise
naturally in complexity reduction arguments that involve multiple ergodic
averages with polynomial iterates. In particular, Proposition 2.4 below
implies that polynomial ergodic averages weighted by a sequence
$(a(n))_{n\in\mathbb{N}}$ can be bounded in terms of the Gowers norm of $a$ on
the abelian group $\mathbb{Z}_{sN}$ for some positive integer $s$ (that
depends only on the degrees of the underlying polynomials).

######  Proposition 2.4.

[17, Lemma 3.5] Let $k,\ell\in\mathbb{N},$
$(X,\mathcal{X},\mu,T_{1},\ldots,T_{k})$ be a system of commuting $\mathbb{Z}$
actions, $p_{i,j}\in\mathbb{Z}[t]$ be polynomials for every $1\leq i\leq k,$
$1\leq j\leq\ell,$ $f_{1},\ldots,f_{\ell}\in L^{\infty}(\mu)$ and
$a:\mathbb{N}\to\mathbb{C}$ be a sequence. Then, there exists
$s\in\mathbb{N},$ depending only on the maximum degree of the polynomials
$p_{i,j}$ and the integers $k,\ell$, and a constant $C_{s}$ depending on $s,$
such that

(22) $\Big{\lVert}\operatorname*{\mathbb{E}}_{1\leq n\leq
N}a(n)\cdot\prod_{j=1}^{\ell}\prod_{i=1}^{k}T_{i}^{p_{i,j}(n)}f_{j}\Big{\rVert}_{L^{2}(\mu)}\leq
C_{s}\left(\left\|a\cdot{\bf
1}_{[1,N]}\right\|_{U^{s}(\mathbb{Z}_{sN})}+\frac{\max\\{1,\left\|a\right\|^{2s}_{\ell^{\infty}[1,sN]}\\}}{N}\right).$

######  Remark 4.

$(i)$ The statement presented in [17] asserts that the second term in the
prior sum is just $o_{N}(1)$, under the assumption that $a(n)\ll n^{c}$ for
all $c>0$. However, a simple inspection of the proof gives the error term
presented above. Indeed, the error terms appearing in the proof of Proposition
2.4 are precisely of the form

$\frac{1}{N}\operatorname*{\mathbb{E}}_{n\in[1,N]}\
\operatorname*{\mathbb{E}}_{{\underline{h}}\in[1,N]^{k}}\Bigl{|}\
\prod_{{\underline{\varepsilon}}\in\\{0,1\\}^{k}}\mathcal{C}^{|{\underline{\varepsilon}}|}\
a(n+{\underline{h}}\cdot{\underline{\varepsilon}})\Bigr{|}$

for $k\leq s-1$, which are the error terms in the van der Corput inequality.
Deducing the error term on (22) is then straightforward.
$(ii)$ The number $s-1$ is equal to the number of applications of the van der
Corput inequality in the associated PET argument and we may always assume that
$s\geq 2$. In that case, Lemma 2.2 and the bound $\left\|{\bf
1}_{[1,N]}\right\|_{U^{s}(\mathbb{Z}_{sN})}\leq 1$ implies that we can replace
the norm in (22) with the term $\left\|a\right\|_{U^{s}[1,N]}$.

For polynomials $p_{i,j}(t)\in\mathbb{R}[t]$ of the form

$p_{i,j}(t)=a_{ij,d_{ij}}t^{d_{ij}}+\dots+a_{ij,1}t+a_{ij,0},$

and $(T_{i,s})_{s\in\mathbb{R}}$ $\mathbb{R}$-actions, we have

$T_{i,p_{i,j}(n)}=\Big{(}T_{i,a_{ij,d_{ij}}}\Big{)}^{n^{d_{ij}}}\cdot\ldots\cdot\Big{(}T_{i,a_{ij,1}}\Big{)}^{n}\cdot\Big{(}T_{i,a_{ij,0}}\Big{)}.$

Thus, Proposition 2.4 implies the following.

######  Corollary 2.5.

Let $k,\ell\in\mathbb{N},$ $(X,\mathcal{X},\mu,S_{1},\ldots,S_{k})$ be a
system of commuting $\mathbb{R}$-actions, $p_{i,j}\in\mathbb{Z}[t]$ be
polynomials for all $1\leq i\leq k,$ $1\leq j\leq\ell,$
$f_{1},\ldots,f_{\ell}\in L^{\infty}(\mu)$ and $a:\mathbb{N}\to\mathbb{C}$ be
a sequence. Then, there exists $s\in\mathbb{N},$ depending only on the maximum
degree of the polynomials $p_{i,j}$ and the integers $k,\ell$ and a constant
$C_{s}$ depending on $s,$ such that

(23) $\Big{\lVert}\operatorname*{\mathbb{E}}_{1\leq n\leq
N}a(n)\cdot\prod_{j=1}^{\ell}\prod_{i=1}^{k}S_{i,p_{i,j}(n)}f_{j}\Big{\rVert}_{L^{2}(\mu)}\leq
C_{s}\left(\left\|a\cdot{\bf
1}_{[1,N]}\right\|_{U^{s}(\mathbb{Z}_{sN})}+\frac{\max\\{1,\left\|a\right\|^{2s}_{\ell^{\infty}[1,sN]}\\}}{N}\right).$

###  2.4. Number theoretic tools

The following lemma is a standard consequence of the prime number theorem and
the sparseness of prime powers (actually, we use this argument in the proof of
Corollary 2.8 below). For a proof, see, for instance, [27, Chapter 25].

######  Lemma 2.6.

For any bounded sequence $(a(n))_{n\in\mathbb{N}}$ in a normed space, we have

(24)
$\lim\limits_{N\to+\infty}\Big{\lVert}\frac{1}{\pi(N)}\sum_{p\in\mathbb{P}{:}\;p\leq
N}a(p)-\frac{1}{N}\sum_{n=1}^{N}\Lambda(n)a(n)\Big{\rVert}=0.$

Therefore, in order to study ergodic averages along primes, we can replace
them with the ergodic averages over $\mathbb{N}$ weighted by the function
$\Lambda(n)$.

For the modified von Mangoldt function, we have the following deep theorem,
which was recently established in [36].

######  Theorem A.

[36, Theorem 1.5] Let $\varepsilon>0$ and assume $L(N)$ is a positive sequence
that satisfies the bounds $N^{\frac{5}{8}+\varepsilon}\leq L(N)\leq
N^{1-\varepsilon}$. Let $s$ be a fixed integer and let $w$ be a positive
integer. Then, if $N$ is large enough in terms of $w$, we have that

(25) $\left\|\Lambda_{w,b}-1\right\|_{U^{s}(N,N+L(N)]}=o_{w}(1)$

for every $1\leq b\leq W$ with $(b,W)=1$.

We will need to use the orthogonality of $\Lambda_{w,b}$ to polynomial phases
in short intervals. This is an immediate consequence of the $U^{d}$ uniformity
in Theorem A in conjunction with an application of the van der Corput
inequality $d$ times until the polynomial phase is eliminated. Alternatively,
one can use Proposition 2.4 for a rotation on the torus $\mathbb{T}$ to carry
out the reduction to Theorem A.101010Evidently, both statements rely on
similar complexity reduction arguments, though Proposition 2.4 is stated in
much larger generality involving numerous polynomials. We omit its proof.

######  Lemma 2.7.

Let $L(N)$ be a positive sequence satisfying $N^{\frac{5}{8}+\varepsilon}\prec
L(N)\prec N^{1-\varepsilon}$ for some $\varepsilon>0$. Then, we have that

(26) $\max_{\underset{(b,W)=1}{1\leq b\leq W}}\sup_{\underset{\deg
p=d}{p\in\mathbb{R}[t]}}\Bigl{|}\operatorname*{\mathbb{E}}_{N\leq n\leq
N+L(N)}\big{(}\Lambda_{w,b}(n)-1\big{)}e(p(n))\Bigr{|}=o_{w}(1).$

for every $N$ large enough in terms of $w$.

######  Remark 5.

$(i)$ The error term $o_{w}(1)$ depends on the degree $d$, but since this will
be fixed in applications, we suppressed that dependence above.
$(ii)$ Quantitative bounds for similar expressions (involving the more general
class of nilsequences, as well) were the main focus in [36], though in that
setting the authors used a different weight of the form
$\Lambda-\Lambda^{\\#}$, where $\Lambda^{\\#}$ is a carefully chosen
approximant for the von Mangoldt function arising from considerations of the
(modified) Cramer random model for the primes.

Finally, we will also use a corollary of the Brun-Titchmarsh inequality to
bound the contribution of bad residue classes in our ergodic averages by a
constant term. For $q\geq 2$ and $(a,q)=1$, we denote by $\pi(x,q,a)$ the
number of primes $\leq x$ that are congruent to $a$ modulo $q$. Alternatively,
one could also use the asymptotics for averages of $\Lambda$ in short
intervals that were established by Huxley [28], since $L(N)$ will be chosen to
grow sufficiently fast in our applications.

######  Theorem B (Brun-Titchmarsh inequality).

We have

(27) $\pi(x+y,q,a)-\pi(x,q,a)\leq\frac{2y}{\phi(q)\log(\frac{y}{q})}$

for every $x\geq y>q$.

While we referred to this as the Brun-Titchmarsh inequality, the previous
theorem was established in [37] by Montgomery and Vaughan (prior results
contained the term $2+o(1)$ in the numerator). We will need a variant of this
theorem adapted to the von Mangoldt function. This follows easily from the
previous theorem and a standard partial summation argument.

######  Corollary 2.8.

For every $q\leq y\leq x$, we have

$\sum_{\underset{n\equiv a\;(q)}{x\leq n\leq x+y}}\Lambda(n)\leq\frac{2y\log
x}{\phi(q)\log(\frac{y}{q})}+O\big{(}\frac{y}{\log
x}\big{)}+O\big{(}x^{\frac{1}{2}}\log x\big{)}.$

###### Proof.

Consider the function

$\pi(x,q,a)=\sum_{\underset{n\equiv a\;(Q)}{1\leq n\leq x}}1_{\mathbb{P}}(n)$

as in the statement of Theorem B, defined for all $x\geq 3/2$. Let

$\theta(x,q,a)=\sum_{\underset{n\equiv a\;(Q)}{1\leq n\leq
x}}1_{\mathbb{P}}(n)\log n,\ \ \psi(x,q,a)=\sum_{\underset{n\equiv
a\;(Q)}{1\leq n\leq x}}\Lambda(n).$

It is evident that

(28) $\Bigl{|}\theta(x,q,a)-\psi(x,q,a)\Bigr{|}\leq\sum_{p^{k}\leq
x{:}\;p\in\mathbb{P},k\geq 2}\log p\leq x^{1/2}\log x,$

since there are at most $x^{1/2}$ prime powers $\leq x$ and each one of them
contributes at most $\log x$ in this sum. Now, we use summation by parts to
deduce that

$\theta(x+y,q,a)-\theta(x,q,a)=\sum_{\underset{n\equiv a\;(Q)}{x<n\leq
x+y}}1_{\mathbb{P}}(n)\log n+O(1)=\pi(x+y,q,a)\log(x+y)-\\\
\pi(x,q,a)\log(x+1)+\sum_{\underset{n\equiv a\;(Q)}{x<n\leq
x+y}}\pi(n,q,a)\Big{(}\log n-\log(n+1)\Big{)}+O(1).$

Using the inequalities $\log n-\log(n+1)\leq-(n+1)^{-1}$ and
$\log(x+y)\leq\log x+y/x$, we deduce that

$\theta(x+y,q,a)-\theta(x,q,a)\leq\log
x\Big{(}\pi(x+y,q,a)-\pi(x,q,a)\Big{)}+\frac{\pi(x+y,q,a)y}{x}-\\\
\sum_{\underset{n\equiv a\;(Q)}{x<n\leq x+y}}\frac{\pi(n,q,a)}{n+1}+O(1).$

Using the estimate $\pi(x,q,a)\ll\frac{x}{\phi(q)\log x}$ and Theorem B, we
bound the sum in the previous expression by

$\log
x\frac{2y}{\phi(q)\log(\frac{y}{q})}+O\Big{(}\frac{(x+y)y}{\phi(q)x\log(x+y)}\Big{)}+O\Big{(}\sum_{\underset{n\equiv
a\;(Q)}{x<n\leq x+y}}\frac{1}{\phi(q)\log n}\Big{)}+O(1).$

Since

$\sum_{\underset{n\equiv a\;(Q)}{x<n\leq x+y}}\frac{1}{\log
n}\leq\int_{x}^{x+y}\frac{dt}{\log t}+O(1)=\frac{x+y}{\log(x+y)}-\frac{x}{\log
x}+\int_{x}^{x+y}\frac{dt}{\log^{2}t}+O(1)\leq\\\ \frac{y}{\log
x}+O(\frac{y}{\log^{2}x})+O(1),$

we conclude that

(29) $\theta(x+y,q,a)-\theta(x,q,a)\leq\frac{2y\log
x}{\phi(q)\log(\frac{y}{q})}+O(\frac{y}{\log x})+O(1).$

Consequently, if we combine (28) and (29), we arrive at

$\psi(x+y,q,a)-\psi(x,q,a)\leq\frac{2y\log
x}{\phi(q)\log(\frac{y}{q})}+O(\frac{y}{\log x})+O(x^{\frac{1}{2}}\log x),$

as was to be shown.∎

######  Remark 6.

We will apply this corollary for $q=W$ and $y\gg x^{5/8+\varepsilon}$. Note
that for $y$ in this range, the second error term can be absorbed into the
first one.

###  2.5. Quantitative equidistribution mod 1

######  Definition 2.9.

Let $(x_{n})_{n\in\mathbb{N}}$ be a real valued sequence. We say that
$(x_{n})_{n\in\mathbb{N}}$ is

  * $\bullet$

equidistributed $mod\;1$ if for all $0\leq a<b\leq 1,$ we have

(30)
$\lim_{N\to+\infty}\frac{\big{|}\big{\\{}n\in\\{1,\ldots,N\\}:\;\\{x_{n}\\}\in[a,b)\big{\\}}\big{|}}{N}=b-a.$

  * $\bullet$

well distributed $mod\;1$ if for all $0\leq a<b\leq 1,$ we have

(31)
$\lim_{N\to+\infty}\frac{\big{|}\big{\\{}n\in\\{1,\ldots,N\\}:\;\\{x_{k+n}\\}\in[a,b)\big{\\}}\big{|}}{N}=b-a,\text{
uniformly in }k=0,1,\ldots.$

In the case of polynomial sequences, their equidistribution properties are
well understood. If the polynomial has rational non-constant coefficients, it
is straightforward to check that the sequence of its fractional parts is
periodic. On the other hand, for polynomials with at least one non-constant
irrational coefficient, we have the following theorem.

######  Theorem C (Weyl).

Let $p\in\mathbb{R}[t]$ be a polynomial with at least one non-constant
irrational coefficient. Then, the sequence $(p(n))_{n\in\mathbb{N}}$ is well-
distributed $mod\>1$.

This theorem is classical and for a proof, we refer the reader to [32, Chapter
1, Theorem 3.2].111111While this theorem concerns the case of
equidistribution, the more general result follows easily by a straightforward
adaptation of van der Corput’s difference theorem to the case of well-
distribution. The authors of [32] discuss this in the notes of Section 5 in
Chapter 1. In the case of Hardy field functions, we have a complete
characterization of equidistribution modulo 1 due to Boshernitzan. We recall
here [4, Theorem 1.3].

######  Theorem D (Boshernitzan).

Let $a\in\mathcal{H}$ be a function of polynomial growth. Then, the sequence
$(a(n))_{n\in\mathbb{N}}$ is equidistributed $mod\;1$ if and only if
$|a(t)-p(t)|\succ\log t$ for every $p\in\mathbb{Q}[t]$.

This theorem explains the assumptions in Theorem 1.1 and, in particular,
condition (7). Indeed, since we need equidistribution assumptions for our
method to work, this condition appears to be vital. We will invoke
Boshernitzan’s theorem only in the case of sub-fractional functions. Indeed,
we will investigate the equidistribution properties of fast-growing functions
by studying their exponential sums in short intervals. This leads to a proof
of the previous theorem indirectly, at least in the case that the function
involved is not sub-fractional.

For our purposes, we will need a quantitative version of the equidistribution
phenomenon. For a finite sequence of real numbers $(u_{n})_{1\leq n\leq N}$
and an interval $[a,b]\subseteq[0,1]$, we define the discrepancy of the
sequence $u_{n}$ with respect to $[a,b]$ by

(32)
$\Delta_{[a,b]}(u_{1},\dots,u_{N})=\Bigg{|}\frac{\bigl{|}\big{\\{}n\in\\{1,\ldots,N\\}{:}\;\\{u_{n}\\}\in[a,b]\big{\\}}\bigr{|}}{N}-(b-a)\Bigg{|}.$

The discrepancy of a sequence is a quantitative measure of how close a
sequence of real numbers is to being equidistributed modulo 1. For example, it
is immediate that for an equidistributed sequence $u_{n}$, we have that

$\lim\limits_{N\to+\infty}{\Delta_{[a,b]}(u_{1},\dots,u_{N})}=0,$

for all $0\leq a\leq b\leq 1.$ For an in-depth discussion on the concept of
discrepancy and the more general theory of equidistribution on $\mathbb{T}$,
we refer the reader to [32]. Our only tool will be an upper bound of Erdős and
Turán on the discrepancy of a finite sequence. For a proof of this result, see
[32, Chapter 2, Theorem 2.5].121212In this book, the theorem is proven for
measures of the form $\nu=\frac{1}{N}\sum_{i=1}^{N}\delta_{x_{i}}$, although
the more general statement follows by noting that every Borel probability
measure is a weak limit of measures of the previous form.

######  Theorem E (Erdős-Turán).

There exists an absolute constant $C$, such that for any positive integer $M$
and any Borel probability measure $\nu$ on $\mathbb{T}$, we have

$\sup_{A\subseteq\mathbb{T}}|\nu(A)-\lambda(A)|\leq
C\Big{(}\frac{1}{M}+\sum_{m=1}^{M}\frac{|\widehat{\nu}(m)|}{m}\Big{)},$

where $\lambda$ is the Lebesgue measure on $\mathbb{T}$ and the supremum is
taken over all arcs $A$ of $\mathbb{T}$.

In particular, specializing to the case that
$\nu=N^{-1}\sum_{i=1}^{N}\delta_{\\{u_{i}\\}}$, where $u_{1},\dots,u_{N}$ is a
finite sequence of real numbers, we have

(33) $\Delta_{[a,b]}(u_{1},\dots,u_{N})\leq
C\Big{(}\frac{1}{M}+\sum_{m=1}^{M}\frac{1}{m}\Bigl{|}\frac{1}{N}\sum_{n=1}^{N}e(mu_{n})\Bigr{|}\Big{)}$

for all positive integers $M$ and all $0\leq a\leq b<1.$

It is clear that in order to get the desired bounds on the discrepancy in our
setting, we will need some estimates for exponential sums of Hardy field
sequences in short intervals. Due to the Taylor approximation, this is morally
equivalent to establishing estimates for exponential sums of polynomial
sequences. There are several well-known estimates in this direction, the most
fundamental of these being a result of Weyl that shows that an exponential sum
along a polynomial sequence is small unless all non-constant coefficients of
the polynomial are “major-arc”. In the case of strongly non-polynomial Hardy
field functions, we will only need to study the leading coefficient of the
polynomial in its Taylor approximation, which will not satisfy such a major-
arc condition. To this end, we require the following lemma.

######  Lemma 2.10.

Let $0<\delta<1$ and $d\in\mathbb{N}$. There exists a positive constant $C$
depending only on $d$, such that if $p(x)=a_{d}x^{d}+\dots+a_{1}x+a_{0}$ is a
real polynomial that satisfies

$\Bigl{|}\frac{1}{N}\sum_{n=1}^{N}e(p(n))\Bigr{|}>\delta,$

then, for every $1\leq k\leq d$, there exists $q\in\mathbb{Z}$ with
$|q|\leq\delta^{-C}$, such that
$N^{k}\left\|qa_{k}\right\|_{\mathbb{T}}\leq\delta^{-C}$.

Note that there is no dependency of the constant on the length of the
averaging interval, or on the implicit polynomial $p$ (apart from its degree).
For a proof of this lemma, see [23, Proposition 4.3], where a more general
theorem is established in the setting of nilmanifolds as well.

###  2.6. Nilmanifolds and correlation sequences

Let $G$ be a nilpotent Lie group with nilpotency degree $s$ and let $\Gamma$
be a discrete and cocompact subgroup. The space $X=G/\Gamma$ is called an
$s$-step nilmanifold. The group $G$ acts on the space $X$ by left
multiplication and the measure on $X$ that is invariant under this action is
called the Haar measure of $X$, which we shall denote by $m_{X}$.

Given a sequence of points $x_{n}\in X$, we will say that the sequence $x_{n}$
is equidistributed on $X$, if for any continuous function $F:X\to\mathbb{C}$
we have that

$\lim\limits_{N\to+\infty}\frac{1}{N}\sum_{n=1}^{N}F(x_{n})=\int F\ d\,m_{X}.$

A subnilmanifold of $X=G/\Gamma$ is a set of the form $Hx$, where $H$ is a
closed subgroup of the Lie group $G$, $x\in X$ and such that $Hx$ is closed in
$X$.

Let $g$ be any element on the group $G$. Then, for any $x\in X$, the closed
orbit of the action of $g$ on $x$ will be denoted by
$\overline{(g^{\mathbb{Z}}x)}$. It is known that this set is a subnilmanifold
of $X=G/\Gamma$ and that the sequence $g^{n}x$ is equidistributed in the
subnilamnifold $\overline{(g^{\mathbb{Z}}x)}$ (see, for example, [27, Chapter
11, Theorem 9]).

We now present the following definition for nilsequences in several variables.

######  Definition 2.11.

Let $k,s$ be positive integers and let $X=G/\Gamma$ be an $s$-step
nilmanifold. Assume that $g_{1},\dots,g_{k}$ are pairwise commuting elements
of the group $G$, $F:X\to\mathbb{C}$ is a continuous function on $X$ and $x\in
X$. Then, the sequence

$\psi(n_{1},\dots,n_{k})=F(g_{1}^{n_{1}}\cdot\ldots\cdot g_{k}^{n_{k}}x),\
\text{where }n_{1},\dots,n_{k}\in\mathbb{Z}$

is called an $s$-step nilsequence in $k$-variables.

The main tool that we will need is an approximation of general nilsequences by
multi-correlation sequences in the $\ell^{\infty}$-sense. The following lemma
is established in [15, Proposition 4.2].

######  Lemma 2.12.

Let $k,s$ be positive integers and $\psi:\mathbb{Z}^{k}\to\mathbb{C}$ be a
$(s-1)$-step nilsequence in $k$ variables. Then, for every $\varepsilon>0$,
there exists a system $(X,\mathcal{X},\mu,T_{1},\dots,T_{k})$ and functions
$F_{1},\dots,F_{s}$ on $L^{\infty}(\mu)$, such that the sequence
$b(n_{1},\dots,n_{k})$ defined by

$b(n_{1},\dots,n_{k})=\int\prod_{j=1}^{s}\big{(}T_{1}^{\ell_{j}n_{1}}\cdot\ldots\cdot
T_{k}^{\ell_{j}n_{k}}\big{)}F_{j}\ d\,\mu,\
(n_{1},\dots,n_{k})\in\mathbb{Z}^{k}$

with $\ell_{j}=s!/j$ satisfies

$\left\|\psi-b\right\|_{\ell^{\infty}(\mathbb{Z}^{k})}\leq\varepsilon.$

######  Comment.

The definition of nilsequences used in [15] imposed that $x=\Gamma$ and that
${\bf n}\in\mathbb{N}^{k}$. However, their arguments generalize in a
straightforward manner to the slightly more general setting that we presented
above.

##  3\. Lifting to an extension flow

In this section, we use a trick that allows us to replace the polynomial
ergodic averages with similar ergodic averages over $\mathbb{R}$ actions on an
extension of the original probability space, removing the rounding functions
in the process.. This argument is implicit in [29] for Cesàro averages, so we
adapt its proof to the setting of short intervals.

######  Proposition 3.1.

Let $k,\ell,d$ be positive integers and let $L(N)$ be a positive sequence
satisfying $N^{\frac{5}{8}+\varepsilon}\ll L(N)\ll N^{1-\varepsilon}$. Let
$(X,\mathcal{X},\mu,T_{1},\dots,T_{k})$ be a system of commuting
transformations. Then, there exists a positive integer $s$ depending only on
$k,\ell,d$, such that for any variable family
$\mathcal{P}=\\{p_{i,j,N}{:}\;1\leq i\leq k,1\leq j\leq\ell\\}$ of polynomials
with degrees at most $d$ that, for all $i,j,$ satisfy

(34) $\lim_{\delta\to 0^{+}}\lim_{N\to+\infty}\frac{\left|\\{N\leq n\leq
N+L(N):\;\\{p_{i,j,N}(n)\\}\in[1-\delta,1)\\}\right|}{L(N)}=0,$

we have that for any $0<\delta<1$ and functions $f_{1},\dots,f_{\ell}\in
L^{\infty}(\mu)$

$\Big{\lVert}\operatorname*{\mathbb{E}}_{N\leq n\leq N+L(N)}\
\big{(}\Lambda_{w,b}(n)-1\big{)}\prod_{j=1}^{\ell}\prod_{i=1}^{k}T_{i}^{{\left\lfloor
p_{i,j,N}(n)\right\rfloor}}f_{j}\Big{\rVert}_{L^{2}(\mu)}\ll_{k,\ell,d}\\\
\frac{1}{\delta^{k\ell}}\Big{(}\big{\lVert}\Lambda_{w,b}(n)-1\big{\rVert}_{U^{s}(N,N+sL(N)]}+o_{w}(1)\Big{)}+o_{\delta}(1)(1+o_{w}(1)),$

for all $1\leq b\leq W,\ (b,W)=1$, where $W=\prod_{p\in\mathbb{P}{:}\;p\leq
w}p$.

###### Proof.

Let $\lambda$ denote the Lebesgue measure on $[0,1)$ and we define (as in
[29]) the measure-preserving $\mathbb{R}^{k\ell}$-action
$\displaystyle\prod_{i=1}^{k}S_{i,s_{i,1}}\cdot\ldots\cdot\prod_{i=1}^{k}S_{i,s_{i,\ell}}$
on the space $Y:=X\times[0,1)^{k\ell},$ endowed with the measure
$\nu:=\mu\times\lambda^{k\ell}$, by

$\prod_{j=1}^{\ell}\prod_{i=1}^{k}S_{i,s_{i,j}}(x,a_{1,1},\ldots,a_{k,1},a_{1,2},\ldots,a_{k,2},\ldots,a_{1,\ell},\ldots,a_{k,\ell})=$
$\left(\prod_{j=1}^{\ell}\prod_{i=1}^{k}T_{i}^{[s_{i,j}+a_{i,j}]}x,\\{s_{1,1}+a_{1,1}\\},\ldots,\\{s_{k,1}+a_{k,1}\\},\ldots,\\{s_{1,\ell}+a_{1,\ell}\\},\ldots,\\{s_{k,\ell}+a_{k,\ell}\\}\right).$

If $f_{1},\ldots,f_{\ell}$ are bounded functions on $X,$ we define the
$Y$-extensions of $f_{j},$ setting for every element
$(a_{1,1},\ldots,a_{k,1},a_{1,2},\ldots,a_{k,2},\ldots,a_{1,\ell},\ldots,a_{k,\ell})\in[0,1)^{k\ell}$:

$\hat{f}_{j}(x,a_{1,1},\ldots,a_{k,1},a_{1,2},\ldots,a_{k,2},\ldots,a_{1,\ell},\ldots,a_{k,\ell})=f_{j}(x),\;\;1\leq
j\leq\ell;\;\;$

and we also define the function

$\hat{f}_{0}(x,a_{1,1},\ldots,a_{k,1},a_{1,2},\ldots,a_{k,\ell})=1_{[0,\delta]^{k\ell}}(a_{1,1},\ldots,a_{k,1},a_{1,2},\ldots,a_{k,\ell}).$

For every $N\leq n\leq N+L(N),$ we consider the functions (on the original
space $X$)

$b_{N}(n):=(\prod_{i=1}^{k}T_{i}^{[p_{i,1,N}(n)]})f_{1}\cdot\ldots\cdot(\prod_{i=1}^{k}T_{i}^{[p_{i,\ell,N}(n)]})f_{\ell}$

as well as the functions

$\tilde{b}_{N}(n):=\hat{f}_{0}\cdot(\prod_{j=1}^{\ell}\prod_{i=1}^{k}S_{i,\delta_{j1}\cdot
p_{i,1,N}(n)})\hat{f}_{1}\cdot\ldots\cdot(\prod_{j=1}^{\ell}\prod_{i=1}^{k}S_{i,\delta_{j\ell}\cdot
p_{i,\ell,N}(n)})\hat{f}_{\ell}$

defined on the extension $Y$. Here, $\delta_{ij}$ denotes the Kronecker
$\delta$, meaning that the only terms that do not vanish are the diagonal ones
(i.e., when $i=j$). For every $x\in X$, we also let

$b^{\prime}_{N}(n)(x):=\int_{[0,1)^{k\ell}}\tilde{b}_{N}(n)(x,a_{1,1},\ldots,a_{k,1},a_{1,2},\ldots,a_{k,2},\ldots,a_{1,\ell},\ldots,a_{k,\ell})\,d\lambda^{k\ell},$

where the integration is with respect to the variables $a_{i,j}.$

Using the triangle and Cauchy-Schwarz inequalities, we have

(35) $\delta^{k\ell}\Big{\lVert}\operatorname*{\mathbb{E}}_{N\leq n\leq
N+L(N)}\big{(}\Lambda_{w,b}(n)-1\big{)}b_{N}(n)\Big{\rVert}_{L^{2}(\mu)}\leq\\\
\Big{\lVert}\operatorname*{\mathbb{E}}_{N\leq n\leq
N+L(N)}\big{(}\Lambda_{w,b}(n)-1\big{)}\cdot(\delta^{k\ell}b_{N}(n)-b^{\prime}_{N}(n))\Big{\rVert}_{L^{2}(\mu)}+\Big{\lVert}\operatorname*{\mathbb{E}}_{N\leq
n\leq
N+L(N)}\big{(}\Lambda_{w,b}(n)-1\big{)}\tilde{b}_{N}(n)\Big{\rVert}_{L^{2}(\nu)}.$

Using Proposition 2.4, we find an integer $s\in\mathbb{N},$ depending only on
the integers $k,\ell,d,$ and a constant $C_{s}$ depending on $s,$ such that

(36) $\Big{\lVert}\operatorname*{\mathbb{E}}_{N\leq n\leq
N+L(N)}\big{(}\Lambda_{w,b}(n)-1\big{)}\tilde{b}_{N}(n)\Big{\rVert}_{L^{2}(\nu)}\leq
C_{s}\left(\big{\lVert}\Lambda_{w,b}-1\big{\rVert}_{U^{s}(N,N+sL(N)]}+o_{N}(1)\right),$

where the $o_{N}(1)$ term depends only on the integer $s$ and the sequence
$\Lambda_{w,b}(n).$

Now we study the first term

$\Big{\lVert}\operatorname*{\mathbb{E}}_{N\leq n\leq
N+L(N)}\big{(}\Lambda_{w,b}(n)-1\big{)}\cdot(\delta^{k\ell}b_{N}(n)-b^{\prime}_{N}(n))\Big{\rVert}_{L^{2}(\mu)}$

in (35). For every $x\in X$ and $N\leq n\leq N+L(N),$ we have

$\begin{split}&\quad\Big{|}\delta^{k\ell}b_{N}(n)(x)-b^{\prime}_{N}(n)(x)\Big{|}=\\\
&\quad\quad\quad\quad\quad\quad\quad\left|\int_{[0,\delta]^{k\ell}}\left(\prod_{j=1}^{\ell}f_{j}(\prod_{i=1}^{k}T_{i}^{[p_{i,j,N}(n)]}x)-\prod_{j=1}^{\ell}f_{j}(\prod_{i=1}^{k}T_{i}^{[p_{i,j,N}(n)+a_{i,j}]}x)\right)\,d\lambda^{k\ell}\right|.\end{split}$

Since all the integrands $a_{i,j}$ are less than or equal than $\delta,$ we
deduce that if all of the implicit polynomials satisfy
$\\{p_{i,j,N}(n)\\}<1-\delta,$ we have
$T_{i}^{[p_{i,j,N}(n)+a_{i,j}]}=T_{i}^{[p_{i,j,N}(n)]}$ for all $1\leq i\leq
k,$ $1\leq j\leq\ell.$ To deal with the possible case where
$\\{p_{i,j,N}(n)\\}\geq 1-\delta$ for at least one of our polynomials, we
define, for every $1\leq i\leq k,$ $1\leq j\leq\ell,$ the set

$E_{\delta,N}^{i,j}:=\\{n\in[N,N+L(N)]{:}\;\\{p_{i,j,N}(n)\\}\in[1-\delta,1)\\}.$

Then, by using the fact that

${\bf 1}_{E_{\delta,N}^{1,1}\cup\ldots\cup E_{\delta,N}^{1,\ell}\cup
E_{\delta,N}^{2,1}\cup\ldots\cup
E_{\delta,N}^{k,\ell}}\leq\sum_{(i,j)\in[1,k]\times[1,\ell]}{\bf
1}_{E_{\delta,N}^{i,j}}$

and that ${\bf 1}_{E_{\delta,N}^{i,j}}(n)={\bf
1}_{[1-\delta,1)}(\\{p_{i,j,N}(n)\\}),$ we infer that

$\Big{|}\delta^{k\ell}b_{N}(n)(x)-b^{\prime}_{N}(n)(x)\Big{|}\leq
2\delta^{k\ell}\sum_{(i,j)\in[1,k]\times[1,\ell]}{\bf
1}_{[1-\delta,1)}(\\{p_{i,j,N}(n)\\})$

for every $x\in X$. In view of the above, using the inequality
$|\Lambda_{w,b}(n)-1|\leq\Lambda_{w,b}(n)+1$, we deduce that

$\operatorname*{\mathbb{E}}_{N\leq n\leq
N+L(N)}\big{|}\big{(}\Lambda_{w,b}(n)-1\big{)}\big{|}\cdot{\bf
1}_{[1-\delta,1)}(\\{p_{i,j,N}(n)\\})\leq\ \ \ \ \\\
\operatorname*{\mathbb{E}}_{N\leq n\leq
N+L(N)}\big{(}\Lambda_{w,b}(n)-1\big{)}\cdot{\bf
1}_{[1-\delta,1)}(\\{p_{i,j,N}(n)\\})+2\operatorname*{\mathbb{E}}_{N\leq n\leq
N+L(N)}{\bf 1}_{[1-\delta,1)}(\\{p_{i,j,N}(n)\\})\leq\\\
\operatorname*{\mathbb{E}}_{N\leq n\leq
N+L(N)}\big{(}\Lambda_{w,b}(n)-1\big{)}\cdot{\bf
1}_{[1-\delta,1)}(\\{p_{i,j,N}(n)\\})+2\cdot\frac{|E^{i,j}_{\delta,N}|}{L(N)}.$

Since each polynomial $p_{i,j,N}$ satisfies (34) for large $N$ and small
enough $\delta,$ the term (and the sum of finitely many terms of this form)
$\frac{|E_{\delta,N}^{i,j}|}{L(N)}$ is as small as we want.

It remains to show that the term

$\operatorname*{\mathbb{E}}_{N\leq n\leq
N+L(N)}\big{(}\Lambda_{w,b}(n)-1\big{)}\cdot{\bf
1}_{[1-\delta,1)}(\\{p_{i,j,N}(n)\\})$

goes to zero as $N\to\infty,$ then $w\to\infty$ and finally $\delta\to 0^{+}.$
To this end, it suffices to show

$\operatorname*{\mathbb{E}}_{N\leq n\leq N+L(N)}\
\big{(}\Lambda_{w,b}(n)-1\big{)}e^{2\pi imp_{i,j,N}(n)}\to 0$

as $N\to\infty$ and then $w\to\infty$ for all
$m\in\mathbb{Z}\setminus\\{0\\},$131313 This follows by the fact that if $f$
is Riemann integrable on $[0,1)$ with $\int_{[0,1)}f(x)\,dx=c,$ then, for
every $\varepsilon>0,$ we can find trigonometric polynomials $q_{1},\;q_{2},$
with no constant terms, with $q_{1}(t)+c-\varepsilon\leq f(t)\leq
q_{2}(t)+c+\varepsilon.$ We use this for the function $f={\bf
1}_{[1-\delta,1)}.$ which follows from Lemma 2.7. ∎

##  4\. Equidistribution in short intervals

We gather here some useful propositions that describe the behavior of a Hardy
field function when restricted to intervals of the form $[N,N+L(N)]$, where
$L(N)$ grows slower compared to the parameter $N$. In our applications, we
will typically need the function $L(N)$ to grow faster than $N^{5/8}$ in order
to be able to use the uniformity results in short intervals, but we will not
need to work under this assumption throughout most of this section, the only
exception being Proposition 4.6 below. We will also present an example that
illustrates the main points in the proof of Theorem 1.1 in the following
section.

###  4.1. Details on the proof

In the case of strongly non-polynomial functions that also grow faster than
some fractional power, we show that the associated Taylor polynomial
$p_{N}(n)$ has ideal equidistribution properties. Indeed, by picking the
length $L(N)$ a little more carefully, one gains arbitrary logarithmic powers
over the trivial bound in the exponential sums of $p_{N}$. Consequently, we
demonstrate that the number of integers in $[N,N+L(N)]$ for which
${\left\lfloor a(n)\right\rfloor}\neq{\left\lfloor p_{N}(n)\right\rfloor}$ is
less than $L(N)(\log N)^{-100}$ (say) and, thus, their contribution to the
average is negligible. Therefore, for all intents and purposes, one can
suppose that the error terms are identically zero.

The situation is different when a function that grows slower than all
fractional powers is involved since these functions are practically constant
in these short intervals. For instance, if one has the function
$p(t)+\log^{2}t$, where $p$ is a polynomial, the only feasible approximation
is of the form $p(n)+\log^{2}n=p(n)+\log^{2}N+e_{N}(n)$, where $e_{N}(n)$
converges to 0. While it seems that we do have a polynomial as the main term
in the approximation (at least when $p$ is non-constant), quantitative bounds
on the exponential sums of the polynomial component cannot be established in
this case at all. The main reason is that such bounds depend heavily on the
diophantine properties of the coefficients of $p$, for which we have no data.

In the case that $p$ is a constant polynomial, we can use the equidistribution
(mod 1) of the sequence $\log^{2}n$ to show that in most short intervals
$[N,N+L(N)]$, we have
${\left\lfloor\log^{2}n\right\rfloor}={\left\lfloor\log^{2}N\right\rfloor}$
for all $n\in[N,N+L(N)]$. The contribution of the bad short intervals is then
bounded using the triangle inequality and Corollary 2.8.

Suppose that the polynomial $p$ above is non-constant. In the case that $p$
has rational non-constant coefficients, we split our averages to suitable
arithmetic progressions so that the resulting polynomials have integer
coefficients (aside from the constant term), and the effect of $e_{N}(n)$ will
be eliminated when we calculate the integer parts. In the case that $p$ has a
non-constant irrational coefficient, we can invoke the well-distribution of
$p(n)$ to conclude that the number of integers of the set

$E_{N}=\\{n\in[N,N+L(N)]{:}\;{\left\lfloor
p(n)+\log^{2}n\right\rfloor}\neq{\left\lfloor p(n)+\log^{2}N\right\rfloor}\\}$

is $O(\varepsilon L(N))$, for a fixed small parameter $\varepsilon$ and $N$
large. However, in order to bound the total contribution of the set $E_{N}$,
we can only use the triangle inequality in the corresponding ergodic averages,
so we are forced to extract information on how large the quantity

$\frac{1}{L(N)}\sum_{N\leq n\leq N+L(N)}\Lambda_{w,b}(n){\bf 1}_{E_{N}}(n)$

can be. This can be bounded effectively if the corresponding exponential sums

$\frac{1}{L(N)}\sum_{N\leq n\leq N+L(N)}\Lambda_{w,b}(n)e\big{(}p(n)\big{)}$

are small. This is demonstrated by combining the fact that the exponential
sums of $p(n)$ are small (due to the presence of an irrational coefficient)
with the fact that exponential sums weighted by $\Lambda_{w,b}(n)-1$ are small
due to the uniformity of the $W$-tricked von Mangoldt function. The conclusion
follows again by an application of the Erdős-Turàn inequality, this time for a
probability measure weighted by $\Lambda_{w,b}(n)$.

###  4.2. A model example

We sketch the main steps in the case of the ergodic averages

(37)
$\frac{1}{N}\sum_{n=1}^{N}\big{(}\Lambda_{w,b}(n)-1\big{)}T^{{\left\lfloor
n\log n\right\rfloor}}f_{1}\cdot T^{{\left\lfloor an^{2}+\log
n\right\rfloor}}f_{2}\cdot T^{{\left\lfloor\log^{2}n\right\rfloor}}f_{3}.$

where $a$ is an irrational number. We will show that the $L^{2}$-norm of this
expression converges to 0, as $N\to+\infty$ and then $w\to+\infty$. Note that
the three sequences in the iterates satisfy our hypotheses. In addition, we
remark that the arguments below are valid in the setting where we have three
commuting transformations, but we consider a simpler case for convenience.
Additionally, we do not evaluate the sequences at $Wn+b$ (as we should in
order to be in the setup of Theorem 1.1), since the underlying arguments
remain identical apart from changes in notation.

We choose $L(t)=t^{0.66}$ (actually, any power $t^{c}$ with $5/8<c<2/3$ works
here) and claim that it suffices to show that

(38) $\operatorname*{\mathbb{E}}_{1\leq r\leq
R}\Big{\lVert}\operatorname*{\mathbb{E}}_{r\leq n\leq
r+L(r)}\big{(}\Lambda_{w,b}(n)-1\big{)}T^{{\left\lfloor n\log
n\right\rfloor}}f_{1}\cdot T^{{\left\lfloor an^{2}+\log
n\right\rfloor}}f_{2}\cdot
T^{{\left\lfloor\log^{2}n\right\rfloor}}f_{3}\Big{\rVert}_{L^{2}(\mu)}=0.$

This reduction is the content of Lemma 5.1. Now, we can use the Taylor
expansion around $r$ to write

$\displaystyle n\log n$ $\displaystyle=r\log r+(\log
r+1)(n-r)+\frac{(n-r)^{2}}{2r}-\frac{(n-r)^{3}}{6\xi_{1,n,r}^{2}}$
$\displaystyle\log n$ $\displaystyle=\log r+\frac{n-r}{\xi_{2,n,r}}$
$\displaystyle\log^{2}n$
$\displaystyle=\log^{2}r+\frac{2(n-r)\log\xi_{3,n,r}}{\xi_{3,n,r}},$

for some real numbers $\xi_{i,n,r}\in[r,n]$ ($i=1,2,3$). Our choice of $L(t)$
implies that

$\Bigl{|}\frac{(n-r)^{3}}{6\xi_{1,n,r}^{2}}\Bigr{|}\leq\frac{r^{3\cdot
0.65}}{6r^{2}}\ll 1,$

and similarly for the other two cases. To be more specific, there exists a
$\delta>0$, such that all the error terms (the ones involving the quantities
$\xi_{i,n,r}$) are $O(r^{-\delta})$.

Let us fix a small $\varepsilon>0$. Firstly, we shall deal with the third
iterate, since this is the simplest one. Observe that if $r$ is chosen large
enough and such that it satisfies
$\\{\log^{2}r\\}\in(\varepsilon,1-\varepsilon)$, then for all
$n\in[r,r+L(r)]$, we will have

${\left\lfloor\log^{2}n\right\rfloor}={\left\lfloor\log^{2}r\right\rfloor},$

since the error terms in the expansion are $O(r^{-\delta})$, which is smaller
than $\varepsilon$ for large $r$. In addition, the sequence $\log^{2}n$ is
equidistributed modulo 1, so our prior assumption can fail for at most
$3\varepsilon R$ (say) values of $r\in[1,R]$, provided that $R$ is
sufficiently large. For the bad values of $r$, we use the triangle inequality
for the corresponding norm to deduce that their contribution on the average is
$O(\varepsilon R)$, which will be acceptable if $\varepsilon$ is small.
Actually, in order to establish this, we will need to use Corollary 2.8,
though we will ignore that in this exposition. In conclusion, we can rewrite
the expression in (38) as

(39) $\operatorname*{\mathbb{E}}_{1\leq r\leq
R}\Big{\lVert}\operatorname*{\mathbb{E}}_{r\leq n\leq
r+L(r)}\big{(}\Lambda_{w,b}(n)-1\big{)}T^{{\left\lfloor n\log
n\right\rfloor}}f_{1}\cdot T^{{\left\lfloor an^{2}+\log
n\right\rfloor}}f_{2}\cdot
T^{{\left\lfloor\log^{2}r\right\rfloor}}f_{3}\Big{\rVert}_{L^{2}(\mu)}+O(\varepsilon).$

Now, we deal with the first function. We claim that the discrepancy of the
finite sequence

$\Big{(}\\{r\log r+(\log r+1)(n-r)+\frac{(n-r)^{2}}{2r}\\}\Big{)}_{r\leq n\leq
r+L(r)}$

is $O_{A}(\log^{-A}r)$ for any $A>0$. We will establish this in Proposition
4.4 using Lemma 2.10 and Theorem E. As a baby case, we show the following
estimate for some simple trigonometric averages:

$\Bigl{|}\operatorname*{\mathbb{E}}_{r\leq n\leq
r+L(r)}e\Big{(}\frac{(n-r)^{2}}{2r}\Big{)}\Bigr{|}\leq\frac{1}{\log^{A}r}$

for $r$ large enough. Indeed, if that inequality fails for some
$r\in\mathbb{N}$, there exists an integer $|q_{r}|\leq\log^{O(A)}r$, such that

$\Big{\lVert}\frac{q_{r}}{2r}\Big{\rVert}_{\mathbb{T}}\leq\frac{\log^{O(A)}r}{(L(r))^{2}}.$

Certainly, if $r$ is large enough, we can replace the norm with the absolute
value, so that the previous inequality implies that

$\big{(}L(r)\big{)}^{2}\leq\frac{2r\log^{O(A)}r}{|q_{r}|}.$

However, the choice $L(t)=t^{0.66}$ implies that this inequality is false for
large $r$.

In our problem, we can just pick $A=2$. Using the definition of discrepancy,
we deduce that the number of integers in $[r,r+L(r)]$, for which we have

$\\{r\log r+(\log
r+1)(n-r)+\frac{(n-r)^{2}}{2r}\\}\in[0,r^{-\delta/2}]\cup[1-r^{-\delta/2},1)$

is $O(L(r)\log^{-2}r)$. However, if $n$ does not belong to this set of bad
values, we conclude that

${\left\lfloor n\log n\right\rfloor}={\left\lfloor r\log r+(\log
r+1)(n-r)+\frac{(n-r)^{2}}{2r}\right\rfloor}$

since the error terms are $O(r^{-\delta})$. Furthermore, since
$\Lambda_{w,b}(n)=O(\log r)$ for $n\in[r,r+L(r)]$, we conclude that the
contribution of the bad values is $o_{r}(1)$ on the inner average. Therefore,
we can rewrite the expression in (39) as

(40) $\operatorname*{\mathbb{E}}_{1\leq r\leq
R}\Big{\lVert}\operatorname*{\mathbb{E}}_{r\leq n\leq
r+L(r)}\big{(}\Lambda_{w,b}(n)-1\big{)}T^{{\left\lfloor
p_{r}(n)\right\rfloor}}f_{1}\cdot T^{{\left\lfloor an^{2}+\log
n\right\rfloor}}f_{2}\cdot
T^{{\left\lfloor\log^{2}r\right\rfloor}}f_{3}\Big{\rVert}_{L^{2}(\mu)}+O(\varepsilon)+o_{R}(1),$

where $p_{r}(n)=r\log r+(\log r+1)(n-r)+\dfrac{(n-r)^{2}}{2r}$.

Finally, we deal with the second iterate. We consider the parameter
$\varepsilon$ as above and set $M=1/\varepsilon$. Once again, we shall assume
that $r$ is very large compared to $M$. Since $a$ is irrational, we have that
the sequence $an^{2}$ is well-distributed modulo 1, so we would expect the
number of $n$ for which $\\{an^{2}+\log
r\\}\not\in[\varepsilon,1-\varepsilon]$ to be small. Note that for the
remaining values of $n$, we have ${\left\lfloor an^{2}+\log
n\right\rfloor}={\left\lfloor an^{2}+\log r\right\rfloor}$, since the error
term in the approximation is $O(r^{-\delta})$. Therefore, we estimate the size
of the set

$\mathcal{B}_{r,\varepsilon}:=\\{n\in[r,r+L(r)]{:}\;\\{an^{2}+\log
r\\}\in[0,\varepsilon]\cup[1-\varepsilon,1)\\}$

Using Weyl’s theorem, we conclude that

(41) $\max_{1\leq m\leq M}\Bigl{|}\operatorname*{\mathbb{E}}_{r\leq n\leq
r+L(r)}e\big{(}m(an^{2}+\log r)\big{)}\Bigr{|}=o_{r}(1).$

Here, the $o_{r}(1)$ term depends on $M=1/\varepsilon$, but since we will send
$r\to+\infty$ and then $\varepsilon\to 0$, this will not cause any issues. We
suppress these dependencies in this exposition.

An application of Theorem E implies that

(42) $\frac{|\mathcal{B}_{r,\varepsilon}|}{L(r)}\ll
2\varepsilon+\frac{1}{M}+\sum_{m=1}^{M}\frac{1}{m}\Bigl{|}\operatorname*{\mathbb{E}}_{r\leq
n\leq r+L(r)}e\big{(}m(ar^{2}+\log r)\big{)}\Bigr{|},$

so that $|\mathcal{B}_{r,\varepsilon}|\ll(\varepsilon+o_{r}(1))L(r)$.
Additionally, we will need to estimate

$\frac{1}{L(r)}\sum_{r\leq n\leq r+L(r)}\Lambda_{w,b}(n){\bf
1}_{\mathcal{B}_{r}}(n),$

which will arise when we apply the triangle inequality to bound the
contribution of the set $\mathcal{B}_{r}$. However, we have that

(43) $\max_{1\leq m\leq M}\Bigl{|}\operatorname*{\mathbb{E}}_{r\leq n\leq
r+L(r)}\Lambda_{w,b}(n)e\big{(}m(an^{2}+\log
r)\big{)}\Bigr{|}=o_{w}(1)+o_{r}(1),$

which can be seen by splitting $\Lambda_{w,b}(n)=(\Lambda_{w,b}(n)-1)+1$,
applying the triangle inequality and using Lemma 2.7 and (41), respectively,
to treat the resulting exponential averages. In view of this, we can apply the
Erdős-Turán inequality (Theorem E) for the probability measure

$\nu(S)=\dfrac{\sum\limits_{r\leq n\leq
r+L(r)}\Lambda_{w,b}(n)\delta_{\\{an^{2}+\log r\\}}(S)}{\sum\limits_{r\leq
n\leq r+L(r)}\Lambda_{w,b}(n)}$

as well as Corollary 2.8 (to bound the sum in the denominator) to conclude
that

$\frac{1}{L(r)}\sum_{r\leq n\leq r+L(r)}\Lambda_{w,b}(n){\bf
1}_{\mathcal{B}_{r}}(n)\ll\varepsilon+o_{w}(1)\log\frac{1}{\varepsilon}+o_{r}(1),$

Therefore, if we apply the triangle inequality, we conclude that the
contribution of the set $\mathcal{B}_{r,\varepsilon}$ on the average over
$[r,r+L(r)]$ is at most
$O(\varepsilon+o_{w}(1)\log\frac{1}{\varepsilon}+o_{r}(1))$. This is
acceptable if we send $R\to+\infty$, then $w\to+\infty$, and then
$\varepsilon\to 0$ at the end.

Ignoring the peculiar error terms that turn out to be satisfactory, we can
rewrite the expression in (40) as

(44) $\operatorname*{\mathbb{E}}_{1\leq r\leq
R}\Big{\lVert}\operatorname*{\mathbb{E}}_{r\leq n\leq
r+L(r)}\big{(}\Lambda_{w,b}(n)-1\big{)}T^{{\left\lfloor
p_{r}(n)\right\rfloor}}f_{1}\cdot T^{{\left\lfloor an^{2}+\log
r\right\rfloor}}f_{2}\cdot
T^{{\left\lfloor\log^{2}r\right\rfloor}}f_{3}\Big{\rVert}_{L^{2}(\mu)}.$

Now, the iterates satisfy the assumptions of Proposition 3.1. This is true for
the first iterate since we have a good bound on the discrepancy and it is also
true for the second iterate because the polynomial $an^{2}$ has an irrational
coefficient (so we can use its well-distribution modulo 1). For the third one,
our claim is obvious because we simply have an integer in the iterate.
Therefore, we can bound the inner average by a constant multiple of the norm

$\left\|\Lambda_{w,b}-1\right\|_{U^{s}(r,r+L(r)]}$

with some error terms that we will ignore here. Finally, we invoke Theorem A
to show that the average

$\operatorname*{\mathbb{E}}_{1\leq r\leq
R}\left\|\Lambda_{w,b}-1\right\|_{U^{s}(r,r+L(r)]}$

converges to 0, which leads us to our desired conclusion.

###  4.3. Some preparatory lemmas

Let us fix a Hardy field $\mathcal{H}$. Firstly, we will need a basic lemma
that relates the growth rate of a Hardy field function of polynomial growth
with the growth rate of its derivative. To do this, we recall a lemma due to
Frantzikinakis [9, Lemma 2.1], as well as [44, Proposition A.1].

######  Lemma 4.1.

Let $a\in\mathcal{H}$ satisfy $t^{-m}\prec a(t)\prec t^{m}$ for some positive
integer $m$ and assume that $a(t)$ does not converge to a non-zero constant as
$t\to+\infty$. Then,

$\frac{a(t)}{t\log^{2}t}\prec a^{\prime}(t)\ll\frac{a(t)}{t}.$

Observe that if a function $a(t)$ satisfies the growth inequalities in the
hypothesis of this lemma, then the function $a^{\prime}(t)$ satisfies
$\frac{t^{-1-m}}{\log^{2}t}\prec a^{\prime}(t)\prec t^{m-1}$. Therefore, we
deduce the relations $t^{-m-2}\prec a^{\prime}(t)\prec t^{m+2}$, which implies
that the function $a^{\prime}(t)$ satisfies a similar growth condition.
Provided that the function $a^{\prime}(t)$ does not converge to a non-zero
constant as $t\to+\infty$, the above lemma can then be applied to the function
$a^{\prime}(t)$.

When a function $a(t)$ is strongly non-polynomial and dominates the
logarithmic function $\log t$, one can get a nice ordering relation for the
growth rates of consecutive derivatives. This is the content of the following
proposition.

######  Proposition 4.2.

[44, Proposition A.2] Let $a\in\mathcal{H}$ be a function of polynomial growth
that is strongly non-polynomial and also satisfies $a(t)\succ\log t$. Then,
for all sufficiently large $k\in\mathbb{N}$, we have

$1\prec\bigl{|}a^{(k)}(t)\bigr{|}^{-\frac{1}{k}}\prec\bigl{|}a^{(k+1)}(t)\bigr{|}^{-\frac{1}{k+1}}\prec
t.$

######  Remark 7.

The proof of Proposition 4.2 in [44] establishes the fact that if $a$
satisfies the previous hypotheses, then the derivatives of $a$ always satisfy
the conditions of Lemma 4.1.

This proposition is the main tool used to show that a strongly non-polynomial
function $a(t)$ can be approximated by polynomials in short intervals. Indeed,
assume that a positive sub-linear function $L(t)$ satisfies

(45) $\bigl{|}a^{(k)}(t)\bigr{|}^{-\frac{1}{k}}\prec
L(t)\prec\bigl{|}a^{(k+1)}(t)\bigr{|}^{-\frac{1}{k+1}}$

for some sufficiently large $k\in\mathbb{N}$ (large enough so that the
inequalities in Proposition 4.2 hold). In particular, this implies that
$\lim\limits_{t\to+\infty}a^{(k+1)}(t)\to 0$.

Then, we can use the Taylor expansion around the point $N$ to write

$a(N+h)=a(N)+{ha^{\prime}(N)}+\dots+\frac{h^{k}a^{(k)}(N)}{k!}+\frac{h^{k+1}a^{(k+1)}(\xi_{N,h})}{(k+1)!}\
\text{for some }\xi_{N,h}\in[N,N+h]$

for every $0\leq h\leq L(N)$. However, we observe that

$\Bigl{|}\frac{h^{k+1}a^{(k+1)}(\xi_{N,h})}{(k+1)!}\Bigr{|}\leq\frac{L(N)^{k+1}|a^{(k+1)}(N)|}{(k+1)!}=o_{N}(1),$

where we used the fact that $|a^{(k+1)}(t)|\to 0$ monotonically (since
$a^{(k+1)}(t)\in\mathcal{H}$). Therefore, we have

$a(N+h)=a(N)+{ha^{\prime}(N)}+\dots+\frac{h^{k}a^{(k)}(N)}{k!}+o_{N}(1),$

which implies that the function $a(N+h)$ is essentially a polynomial in $h$.

The final lemma implies that if the function $L(t)$ satisfies certain growth
assumptions, then a strongly non-polynomial function $a(t)$ will be
approximated by a polynomial of some degree $k$.

######  Proposition 4.3.

Let $a\in\mathcal{H}$ be a strongly non-polynomial function of polynomial
growth, such that $a(t)\succ\log t$. Assume that $L(t)$ is a positive sub-
linear function, such that $1\prec L(t)\ll t^{1-\varepsilon}$ for some
$\varepsilon>0$. Then, there exists a non-negative integer $k$ depending on
the function $a(t)$ and $L(t)$, such that

$\bigl{|}a^{(k)}(t)\bigr{|}^{-\frac{1}{k}}\prec
L(t)\prec\bigl{|}a^{(k+1)}(t)\bigr{|}^{-\frac{1}{k+1}},$

where we adopt the convention that $\bigl{|}a^{(k)}(t)\bigr{|}^{-\frac{1}{k}}$
denotes the constant function 1, when $k=0$.

###### Proof.

We split the proof into two cases depending on whether $a$ is sub-fractional
or not.

Assume first that $a(t)\ll t^{\delta}$ for all $\delta>0$. We will establish
the claim for $k=0$. This means that functions that are sub-fractional become
essentially constant when restricted to intervals of the form $[N,N+L(N)]$.
The left inequality is obvious. Furthermore, since $a(t)\prec
t^{\varepsilon}$, Lemma 4.1 implies that

$a^{\prime}(t)\prec\frac{1}{t^{1-\varepsilon}}\ll\frac{1}{L(t)},$

which yields the desired result.

Assume now that $a(t)\succ t^{\delta}$ for some $\delta>0$. Observe that, in
this case, we have that

$\bigl{|}a^{(k)}(t)\bigr{|}^{-\frac{1}{k}}\prec\bigl{|}a^{(k+1)}(t)\bigr{|}^{-\frac{1}{k+1}}$

for $k$ large enough, due to Proposition 4.2. We also consider the integer
$d$, such that $t^{d}\prec a(t)\prec t^{d+1}$. This number exists because the
function $a$ is strongly non-polynomial.

If $L(t)\prec\bigl{|}a^{(d+1)}(t)\bigr{|}^{-\frac{1}{d+1}}$, then the claim
holds for $k={d}$, since $\bigl{|}a^{(d)}(t)\bigr{|}^{-\frac{1}{d}}\prec
1\prec L(t)$.

It suffices to show that there exists $k\in\mathbb{N}$, such that
$L(t)\prec\bigl{|}a^{(k+1)}(t)\bigr{|}^{-\frac{1}{k+1}}$, which, in turn,
follows if we show that

(46) $t^{1-\varepsilon}\prec\bigl{|}a^{(k+1)}(t)\bigr{|}^{-\frac{1}{k+1}}$

for some $k\in\mathbb{N}$. We can rewrite the above inequality as
$a^{(k+1)}(t)\prec t^{(k+1)(\varepsilon-1)}$. However, since the function
$a(t)$ is strongly non-polynomial and $a(t)\succ\log t$, the functions
$a^{(k)}(t)$ satisfy the hypotheses of Lemma 4.1 (see also Remark 7).
Therefore, iterating the aforementioned lemma, we deduce that

$a^{(k+1)}(t)\ll\frac{a(t)}{t^{k+1}}.$

Hence, it suffices to find $k$ such that $a(t)\ll t^{(k+1)\varepsilon}$ and
such a number exists, because the function $a(t)$ has polynomial growth. ∎

######  Remark 8.

The condition $L(t)\prec t^{1-\varepsilon}$ is necessary. For example, if
$a(t)=t\log t$ and $L(t)=\frac{t}{\log t}$, then for any $k\in\mathbb{N}$, we
can write

$(N+h)\log(N+h)=N\log
N+\dots+\frac{C_{1}h^{k}}{N^{k-1}}+\frac{C_{2}h^{k+1}}{\xi_{N,h}^{k}}$

for every $0\leq h\leq\frac{N}{\log N}$ and some numbers
$C_{1},C_{2}\in\mathbb{R}$. However, there is no positive integer $k$ for
which the last term in this expansion can be made to be negligible since
$\frac{N}{\log N}\succ N^{\frac{k}{k+1}}$ for all $k\in\mathbb{N}$.
Essentially, in order to approximate the function $t\log t$ in these specific
short intervals, one would be forced to use the entire Taylor series instead
of some appropriate cutoff.

###  4.4. Eliminating the error terms in the approximations

In the previous subsection, we saw that any Hardy field function can be
approximated by polynomials in short intervals using the Taylor expansion.
Namely, if $a(t)$ diverges and $L(t)\to+\infty$ is a positive function, such
that

(47) $\bigl{|}a^{(k)}(t)\bigr{|}^{-\frac{1}{k}}\prec
L(t)\prec\bigl{|}a^{(k+1)}(t)\bigr{|}^{-\frac{1}{k+1}}$

then, for any $0\leq h\leq L(N)$, we have

$a(N+h)=a(N+h)=a(N)+\dots+\frac{h^{k}a^{(k)}(N)}{k!}+\frac{h^{k+1}a^{(k+1)}(\xi_{N,h})}{(k+1)!}=p_{N}(h)+\theta_{N}(h)$

$\text{for some }\xi_{N,h}\in[N,N+h]$, where we denote

$p_{N}(h)=a(N)+\dots+\frac{h^{k}a^{(k)}(N)}{k!}.$

Observe that our growth assumption on $L(t)$ implies that the term
$\theta_{N}(h)$ is bounded by a quantity that converges to 0, as
$N\to+\infty$. Therefore, for large values of $N$, we easily deduce that

${\left\lfloor a(N+h)\right\rfloor}={\left\lfloor
p_{N}(h)\right\rfloor}+\varepsilon_{N,h},$

where $\varepsilon_{N,h}\in\\{-1,0,1\\}$. In order to be able to apply
Proposition 3.1, we will need to eliminate the error terms
$\varepsilon_{N,h}$. We will consider three distinct cases, which are tackled
using somewhat different arguments.

####  4.4.1. The case of fast-growing functions

Firstly, we establish the main proposition that will allow us to remove the
error terms in the case of functions that contain a "non-polynomial part"
which does not grow too slowly. We will need a slight strengthening of the
growth conditions in (47), which, as we saw previously, are sufficient to have
a Taylor approximation in the interval $[N,N+L(N)]$.

######  Proposition 4.4.

Let $A>0$ and let $a(t)$ be a $C^{\infty}$ function defined for all
sufficiently large $t\in\mathbb{R}$. Assume $L(t)$ is a positive sub-linear
function going to infinity and let $k$ be a positive integer, such that

(48) $1\lll\bigl{|}a^{(k)}(t)\bigr{|}^{-\frac{1}{k}}\lll
L(t)\lll\bigl{|}a^{(k+1)}(t)\bigr{|}^{-\frac{1}{k+1}}$

and such that the function $a^{(k+1)}(t)$ converges to 0 monotonically. Then,
for $N$ large enough, we have that, for all $0\leq c\leq d<1$,

(49)
$\dfrac{\big{|}\\{n\in[N,N+L(N)]{:}\;a(n)\in[c,d]\\}\big{|}}{L(N)}=|d-c|+O_{A}(L(N)\log^{-A}N).$

Consequently, for all $N$ sufficiently large, we have that

${\left\lfloor a(N+h)\right\rfloor}={\left\lfloor
a(N)+{ha^{\prime}(N)}+\dots+\frac{h^{k}a^{(k)}(N)}{k!}\right\rfloor}$

for all, except at most $O_{A}(L(N)\log^{-A}(N))$ values of integers
$h\in[N,N+L(N)]$.

###### Proof.

Our hypothesis on $L(t)$ implies that there exist
$\varepsilon_{1},\varepsilon_{2}>0$ such that

(50) $L(t)\bigl{|}a^{(k)}(t)\bigr{|}^{\frac{1}{k}}\gg
t^{\varepsilon_{1}}\text{ and }\
L(t)\bigl{|}a^{(k+1)}(t)\bigr{|}^{\frac{1}{k+1}}\ll t^{-\varepsilon_{2}}.$

In addition, the leftmost inequality implies that there exists
$\varepsilon_{3}>0$, such that $a^{(k)}(t)\ll t^{-\varepsilon_{3}}$. Using the
Taylor expansion around the point $N$, we can write

(51)
$a(N+h)=a(N)+{ha^{\prime}(N)}+\dots+\frac{h^{k}a^{(k)}(N)}{k!}+\frac{h^{k+1}a^{(k+1)}(\xi_{h})}{(k+1)!},\
\text{ for some }\xi_{h}\in[N,N+h],$

for every $h\in[0,L(N)]$. We denote

$p_{N}(h)=a(N)+\dots+\frac{h^{k}a^{(k)}(N)}{k!}$

and

$\theta_{N}(h)=\frac{h^{k+1}a^{(k+1)}(\xi_{h})}{(k+1)!}.$

The function $a^{(k+1)}(t)$ converges to 0 monotonically due to our
hypothesis. Therefore, for sufficiently large $N$,

(52) $\max_{0\leq h\leq
L(N)}|\theta_{N}(h)|\leq\Bigl{|}\frac{a^{(k+1)}(N)}{(k+1)!}\Bigr{|}(L(N))^{k+1}=\theta_{N},$

and the quantity $\theta_{N}$ is strongly dominated by the constant 1 due to
(50). More precisely, we have that $\theta_{N}\ll N^{-(k+1)\varepsilon_{2}}$.

Let $A>0$ be any constant. We study the discrepancy of the finite polynomial
sequence

$p_{N}(h),\ \text{where }0\leq h\leq{L(N)}.$

We shall establish that we have

$\Delta_{[c,d]}\big{(}p_{N}(h)\big{)}\ll_{A}\log^{-A}N$

for any choice of the interval $[c,d]\subseteq[0,1]$. To this end, we apply
Theorem E for the finite sequence $(p_{N}(h))_{0\leq h\leq L(N)}$ to deduce
that

(53) $\Delta_{[c,d]}\Big{(}\big{(}p_{N}(h)\big{)}_{0\leq h\leq
L(N)}\Big{)}\leq\frac{C}{{\left\lfloor\log^{A}N\right\rfloor}}+C\sum_{m=1}^{{\left\lfloor\log^{A}N\right\rfloor}}\frac{1}{m}\Bigl{|}\underset{0\leq
h\leq{L(N)}}{\operatorname*{\mathbb{E}}}\ e(mp_{N}(h))\Bigr{|},$

where $C$ is an absolute constant. We claim that for every $1\leq
m\leq{\left\lfloor\log^{A}N\right\rfloor}$, we have that

(54) $\Bigl{|}\underset{0\leq h\leq{L(N)}}{\operatorname*{\mathbb{E}}}\
e(mp_{N}(h))\Bigr{|}\leq\frac{1}{\log^{A}N},$

provided that $N$ is sufficiently large. Indeed, assume for the sake of
contradiction that there exists $1\leq
m_{0}\leq{\left\lfloor\log^{A}N\right\rfloor}$, such that

(55) $\Bigl{|}\underset{0\leq h\leq{L(N)}}{\operatorname*{\mathbb{E}}}\
e(m_{0}p_{N}(h))\Bigr{|}>\frac{1}{\log^{A}N}.$

The leading coefficient of $m_{0}p_{N}(h)$ is equal to

$\frac{m_{0}a^{(k)}(N)}{k!}.$

Then, Lemma 2.10 implies that there exists a constant $C_{k}$ (depending only
on $k$) an integer $q$ satisfying $|q|\leq\log^{C_{k}A}N$ and such that

$\Big{\lVert}q\cdot\frac{m_{0}a^{(k)}(N)}{k!}\Big{\rVert}_{\mathbb{T}}\leq\frac{\log^{C_{k}A}N}{{\left\lfloor
L(N)\right\rfloor}^{k}}.$

The number $qm_{0}$ is bounded in magnitude by $\log^{(C_{k}+1)A}(N)$, so that

$q\cdot\frac{m_{0}a^{(k)}(N)}{k!}\ll\log^{(C_{k}+1)A}N\cdot
N^{-\varepsilon_{3}}=o_{N}(1).$

Therefore, for large values of $N$, we can substitute the circle norm of the
fraction in (55) with the absolute value, which readily implies that

$\Bigl{|}q\cdot\frac{m_{0}a^{(k)}(N)}{k!}\Bigr{|}\leq\frac{\log^{C_{k}A}N}{{\left\lfloor
L(N)\right\rfloor}^{k}}\implies{\left\lfloor
L(N)\right\rfloor}^{k}\big{|}a^{(k)}(N)\big{|}\leq k!\log^{C_{k}A}N.$

However, this implies that $L(t)$ cannot strongly dominate the function
$\big{(}a^{(k)}(t)\big{)}^{-\frac{1}{k}}$, which is a contradiction due to our
hypothesis.

We have established that for every $1\leq
m\leq{\left\lfloor\log^{A}N\right\rfloor}$ and large $N$, inequality (54)
holds. Substituting this in (53), we deduce that

$\Delta_{[c,d]}\Big{(}\big{(}p_{N}(h)\big{)}_{0\leq
h\leq{L(N)}}\Big{)}\leq\frac{C}{{\left\lfloor\log^{A}N\right\rfloor}}+C\sum_{m=1}^{{\left\lfloor\log^{A}N\right\rfloor}}\frac{1}{m\log^{A}N},$

which implies that

$\Delta_{[c,d]}\Big{(}\big{(}p_{N}(h)\big{)}_{0\leq
h\leq{L(N)}}\Big{)}\ll\frac{A\log\log N}{\log^{A}N}.$

In particular, since $A$ was arbitrary, we get

(56) $\Delta_{[c,d]}\Big{(}\big{(}p_{N}(h)\big{)}_{0\leq
h\leq{L(N)}}\Big{)}\ll_{A}\frac{1}{\log^{A}N}.$

This establishes the first part of the proposition.

The second part of our statement follows from an application of the bound on
the discrepancy of the finite polynomial sequence $(p_{N}(h))$. Indeed, we
consider the set

$S_{N}=[0,\theta_{N}]\cup[1-\theta_{N},1),$

where we recall that $\theta_{N}$ was defined in (52) and decays faster than a
small fractional power. Then, if $\\{p_{N}(h)\\}\notin S_{N}$, we have
${\left\lfloor p_{N}(h)+\theta_{N}(h)\right\rfloor}={\left\lfloor
p_{N}(h)\right\rfloor}$, as can be seen by noticing that the error term in
(51) is bounded in magnitude by $\theta_{N}$. Now, we estimate the number of
integers $h\in[0,L(N)]$ for which $\\{p_{N}(h)\\}\in S_{N}$.

Using the definition of discrepancy and the recently established bounds, we
deduce that

$\dfrac{\bigl{|}\\{h\in[0,{L(N)}]{:}\;\\{p_{N}(h)\\}\in[0,\theta_{N}]\\}\bigr{|}}{{L(N)}{}}-\theta_{N}\ll_{A}\frac{1}{\log^{A}N}$

for every $A>0$. Since the number $\theta_{N}$ is dominated by
$N^{-(k+1)\varepsilon_{2}}$, this implies that

$\bigl{|}\\{h\in[0,L(N)]{:}\;\\{p_{N}(h)\\}\in[0,\theta_{N}]\\}\bigr{|}\ll_{A}\frac{L(N)}{\log^{A}N}.$

An entirely similar argument yields the analogous relation for the interval
$[1-\theta_{N},1)$. Therefore, the number of integers in $[0,L(N)]$ for which
$\\{p_{N}(h)\\}\in S_{N}$ is at most $O_{A}({L(N)}\log^{-A}N)$.

In conclusion, since ${\left\lfloor a(N+h)\right\rfloor}={\left\lfloor
p_{N}(h)\right\rfloor}$ for all integers not in $S_{N}$, we have that the
number of integers which does not satisfy this last relation is
$O_{A}(L(N)\log^{-A}N)$, which yields the desired result. ∎

The above proposition asserts that, for almost all values of $h\in[0,L(N)]$,
we can write ${\left\lfloor a(N+h)\right\rfloor}={\left\lfloor
p_{N}(h)\right\rfloor}$. The logarithmic power saving in the statement will be
helpful since we are dealing with averages weighted by the sequence
$\Lambda_{w,b}(n)-1$, which has size comparable to $\log N$ on the interval
$[N,N+L(N)]$. Furthermore, notice that we did not assume that $a$ is a Hardy
field function in the proof. Thus, the conditions in this proposition can be
used to prove a comparison result for more general iterates.

####  4.4.2. The case of slow functions

Unfortunately, the previous proposition cannot deal with functions whose only
possible Taylor approximations involve only a constant term. This case will
emerge when we have sub-fractional functions (see Definition 2.1) since, as we
have already remarked, these functions have a polynomial approximation of
degree 0 in short intervals (assuming that $L(t)\ll t^{1-\varepsilon}$). To
cover this case, we will need the following proposition which is practically
of a qualitative nature.

######  Proposition 4.5.

Let $a(t)\in\mathcal{H}$ be a sub-fractional function such that $a(t)\succ\log
t$. Assume $L(t)$ is a positive sub-linear function going to infinity and such
that $L(t)\ll t^{1-\delta}$, for some $\delta>0$. Then, for every
$0<\varepsilon<1$, we have the following: for all $R\in\mathbb{N}$
sufficiently large we have ${\left\lfloor a(N+h)\right\rfloor}={\left\lfloor
a(N)\right\rfloor}$ for every $h\in[0,L(N)]$, for all, except at most
$\varepsilon R$ values of $N\in[1,R]$.

###### Proof.

Observe that for any $h\in[0,L(N)]$, we have

(57) $a(N+h)=a(N)+ha^{\prime}(\xi_{h})$

for some $\xi_{h}\in[N,N+h]$. In addition, since $a^{\prime}(t)$ converges to
0 monotonically, we have

$|ha^{\prime}(\xi_{h})|\leq L(N)a^{\prime}(N)\ll N^{1-\delta}a^{\prime}(N)\lll
1,$

where the last inequality follows from Lemma 4.1 and the assumption that
$a(t)$ is sub-fractional. In particular, there exists a positive real number
$q$, such that $|ha^{\prime}(\xi_{h})|\ll N^{-q}$, for all
$h\in[0,L(N)]$.151515We do not actually need this quantity to converge to zero
faster than some power of $N$. The same argument applies if this quantity
simply converges to zero.

The sequence $a(n)$ is equidistributed mod 1 by Theorem D, since it dominates
the function $\log t$. Now, suppose that $\varepsilon>0$, and choose a number
$R_{0}$ such that ${R_{0}^{-2q}}<\varepsilon/2$. Then, for $R\geq R_{0}$, the
number of integers $N\in[R_{0},R]$ such that
$\\{a(N)\\}\in[\frac{\varepsilon}{2},1-\frac{\varepsilon}{2}]$ is

$(R-R_{0})(1-\varepsilon+o_{R}(1))$

due to the fact that $a(n)$ is equidistributed. For these values of $N$, we
have that

$\\{a(N)\\}\notin[0,N^{-2q}]\cup[1-N^{-2q},1],$

which implies that for all $h\in[0,L(N)]$, we have that ${\left\lfloor
a(N+h)\right\rfloor}={\left\lfloor a(N)\right\rfloor}$, as can be derived
easily by (57) and the fact that the error term is $O(N^{-q})$. If we consider
the integers $N$ in the interval $[1,R_{0}]$ as well, then the number of “bad
values” (that is, the numbers $N$ for which we do not have ${\left\lfloor
a(N+h)\right\rfloor}={\left\lfloor a(N)\right\rfloor}$ for every
$h\in[0,L(N)]$) is at most

$R_{0}+(R-R_{0})(\varepsilon+o_{R}(1)).$

Finally, choosing $R$ sufficiently large, we get that this number is smaller
than $2\varepsilon R$ and the claim follows. ∎

In simplistic terms, what we have established is that if we restrict our
attention to short intervals $[N,N+L(N)]$ for the natural numbers $N$, such
that $\\{a(N)\\}\in[\varepsilon,1-\varepsilon]$, then we can just write
${\left\lfloor a(N+h)\right\rfloor}={\left\lfloor a(N)\right\rfloor}$ for all
$h\in[0,L(N)]$. Due to the equidistribution of $a(n)$ mod 1 (which follows
from Theorem D), this is practically true for almost all $N$, if we take
$\varepsilon$ sufficiently small.

####  4.4.3. The case of polynomial functions

The final case is the case of functions of the form $p(t)+x(t)$, where $p$ is
a polynomial with real coefficients and $x(t)$ is a sub-fractional function.
The equidistribution of the corresponding sequence will be affected only by
the polynomial $p$ when restricted to short intervals. Nonetheless, the
techniques of Proposition 4.4 cannot be employed, because we cannot establish
quantitative bounds on the exponential sums uniformly over all real
polynomials. Therefore, we will use the following proposition, which allows us
to calculate the integer parts in this case. Unlike the previous two
propositions which can be bootstrapped to give a similar statement for several
functions, we establish this one for several functions from the outset. We do
not need to concern ourselves with rational polynomials, since these can be
trivially reduced to the case of integer polynomials by passing to arithmetic
progressions.

######  Proposition 4.6.

Let $k,d$ be positive integers, let $0<\varepsilon<1/2$ be a real number and
let $w\in\mathbb{N}$. We define $W=\prod_{p\in\mathbb{P}{:}\;p\leq w}p$ and
let $1\leq b\leq W$ be any integer with $(b,W)=1$. Suppose that
$a_{1},\dots,a_{k}\in\mathcal{H}$ are functions of the form
$p_{i}(t)+x_{i}(t)$, where $p_{i}$ are polynomials of degree at most $d$ and
with at least one irrational non-constant coefficient, while $x_{i}(t)$ are
sub-fractional functions. Finally, assume that $L(t)$ is a positive sub-linear
function going to infinity and such that

$t^{\frac{5}{8}}\lll L(t)\lll t.$

Then, for every $r$ sufficiently large in terms of $w$,
$\frac{1}{\varepsilon}$, we have that there exists a subset
$\mathcal{B}_{r,\varepsilon}$ of integers in the interval $[r,r+L(r)]$ with at
most $O_{k}(\varepsilon L(r))$ elements, such that for all integers
$n\in[r,r+L(r)]\setminus\mathcal{B}_{r,\varepsilon}$, we have

${\left\lfloor p_{i}(n)+x_{i}(n)\right\rfloor}={\left\lfloor
p_{i}(n)+x_{i}(r)\right\rfloor}.$

Furthermore, the set $\mathcal{B}_{r,\varepsilon}$ satisfies

(58) $\frac{1}{L(r)}\sum_{r\leq n\leq r+L(r)}\Lambda_{w,b}(n){\bf
1}_{\mathcal{B}_{r,\varepsilon}}(n)\ll_{k,d}\varepsilon+o_{w}(1)\log\frac{1}{\varepsilon}+o_{r}(1).$

######  Remark 9.

The $o_{r}(1)$ term depends on the fixed parameters $w,\varepsilon$. However,
in our applications, we will send $r\to+\infty$, then we will send
$w\to+\infty$, and then $\varepsilon\to 0$. We shall reiterate this
observation in the proof of Theorem 1.1. On the other hand, the $o_{w}(1)$
term is the same as the one in 2.7 and depends on the degree $d$ of the
polynomials, which will be fixed in applications.

###### Proof of Proposition 4.6.

Fix an index $1\leq i\leq k$ and consider a sufficiently large integer $r$.
Using the mean value theorem and the fact that $|x_{i}^{\prime}(t)|$ decreases
to 0 faster than all fractional powers by Lemma 4.1, we deduce that

$\max_{0\leq h\leq L(r)}|x_{i}(r+h)-x_{i}(r)|\leq L(r)|x^{\prime}_{i}(r)|\lll
1.$

In particular, there exists $\delta_{0}>0$ depending only on the functions
$a_{1},\dots,a_{k}$ and $L(t)$, such that

(59) $\max_{0\leq h\leq L(r)}|x_{i}(r+h)-x_{i}(r)|\ll r^{-\delta_{0}}$

for all $1\leq i\leq k$. Thus, we observe that if
$\\{p_{i}(n)+x_{i}(r)\\}\in(\varepsilon,1-\varepsilon)$ and $r$ is large
enough in terms of $1/\varepsilon$, then we have that

${\left\lfloor p_{i}(n)+x_{i}(n)\right\rfloor}={\left\lfloor
p_{i}(n)+x_{i}(r)\right\rfloor}.$

Naturally, we consider the set

(60)
$\mathcal{B}_{i,r,\varepsilon}=\\{n\in[r,r+L(r)]{:}\;\\{p_{i}(n)+x_{i}(r)\\}\in[0,\varepsilon]\cup[1-\varepsilon,1)\\}$

and take
$\mathcal{B}_{r,\varepsilon}=\mathcal{B}_{1,r,\varepsilon}\cup\dots\cup\mathcal{B}_{k,r,\varepsilon}$.
Now, we observe that the polynomial sequence $p_{i}$ is well-distributed