Divergent Square Averages

Zoltán BuczolichThis author's work was started during his visit at the Department of Mathematics of University of North Texas and later was supported by the Hungarian National Foundation for Scientific Research T049727. , Department of Analysis, Eötvös Loránd University, Pázmány Péter Sétány 1/c, 1117 Budapest, Hungary email: buczo@cs.elte.hu www.cs.elte.hu/ ∼ buczo and R. Daniel MauldinSupported in part by NSF grant DMS 0400481 as a van Fleck Visiting Researcher at Wesleyan University during 2005. 2000 Mathematics Subject Classification: Primary 37A05; Secondary 28D05, 47A35. Keywords: ergodic theorem, quadratic residue, maximal inequality , Department of Mathematics, University of North Texas, Denton, Texas 76203-1430, USA email: mauldin@unt.edu www.math.unt.edu/ ∼ mauldin

November 27, 2006

Abstract
In this paper we answer a question of J. Bourgain. We show that the sequence { n 2 } n = 1   is L 1   -universally bad. This implies that it is not true that given a dynamical system ( X , Σ , μ , T )   and f L 1 ( μ )   , the ergodic means lim N 1 N n = 1 N f ( T n 2 ( x ) )   converge almost surely.

1 Introduction

Results of Bourgain [3, [4, [5imply that given a dynamical system ( X , Σ , μ , T )   and f L p ( μ )   , for some p > 1   , the ergodic means
lim N 1 N n = 1 N f ( T n 2 ( x ) ) (1)
converge almost surely. Bourgain also asked in [3, [7whether this result is true for L 1   functions. In this paper we give a negative answer to this question.
Let us recall some concepts related to this problem.
Definition 1. A sequence { n k } k = 1   is L 1   -universally bad if for all ergodic dynamical systems there is some f L 1   such that lim N 1 N k = 1 N f ( T n k x )   fails to exist for all x   in a set of positive measure.
By the Conze principle and the Banach principle of Sawyer (see [8, [17, or [16), the sequence { n k } k = 1   is L 1   -universally bad if there is no constant C <   such that for all systems ( X , Σ , μ , T )   and all f L 1 ( μ )   we have the following weak ( 1 , 1 )   inequality for all t R :  
μ ( { x : sup N 1 | 1 N k = 1 N f ( T n k x ) | > t } ) C t | f | d μ . (2)
The main result of this paper is
Theorem 1. The sequence { k 2 } k = 1   is L 1   -universally bad.
This theorem will be proved by showing that there is no constant C   such that the weak ( 1 , 1 )   inequality given in  2 holds.
This paper is a new and substantially modified version of our preprint from 2003. The proof in that preprint contained a gap but the methods of that paper lead to a solution of a counting problem raised by I. Assani (see [1and [2).
The paper is organized as follows. In Section  2 we develop the necessary ingredients we need concerning the asymptotic distribution of squares modulo q   where q   is the product of κ   distinct primes. The specific technical property we need is given in Lemma  2 . In Section  3 we develop the notion of a periodic rearrangement of a given periodic set. Lemma  3 states a property about the frequency squares hit such sets; we will need this later in our construction.
Section  4 is the technical heart of the paper. For positive integers K   , M   and a periodic set Λ   we define the notion of a K M   family living on Λ   .
What we need for the proof of our main theorem is the existence of some specific families living on Λ = R .   The properties of these families are stated in Lemma  4 . However we need a double induction argument to show that such families exist. In Section  4.1 , in Lemma  5 assuming K M   families exist for all parameter values on R   , we show that they exist on periodic sets Λ   . In Section  4.2 we turn to the proof that if K M   families exist, then ( K + 1 ) M   families exist as well, this induction on K   is our outer inductive construction.
The proof of the existence ( K + 1 ) M   families involves an intricate inner inductive construction, the “leakage process”, which is outlined in Section  4.2.1 and carried out in Sections  4.2.2 through  4.2.7 . Once it has halted, it is shown in Section  4.2.8 how to adjust the functions so that the next stage of the outer induction holds. In Section  5 , we give the proof of the main theorem. We construct a sequence of rational rotations T p   , functions f p   and numbers t p   which witness that there is no constant C   satisfying  2 .
Let us fix some notation. Given f : R R   , periodic by p   we put ¯ f = 1 p 0 p f ( x ) d x .   Given a Lebesgue measurable set A   , periodic by p   we put λ ¯ ( A ) = 1 p λ ( A [ 0 , p ) ) .  

2 Number Theory/Quadratic residues

For each q N   and n Z   set ɛ ( n , q ) = 1   if n   is congruent to a square modulo q   , and let ɛ ( n , q ) = 0   if not. We denote by σ q   the number of squares modulo q   . If p   is an odd prime, then σ p = p + 1 2   . If q = p 1 p κ   where p 1 , . . . , p κ   are distinct odd primes, then (by the fact that something is a square modulo q   if and only if it is a square modulo each p i   plus by using the Chinese remainder theorem) σ q = i = 1 κ p i + 1 2   . For elementary properties of quadratic residues see [10pages 67-69, or Chapter 3 of [14. We remark that though 0 2 = 0   , when talking about quadratic residues usually only those are considered which are not congruent to 0   , but since ɛ ( n , q ) = 1   when n   is congruent to 0   modulo q   we will regard 0   a quadratic residue (or square) in this paper.
Put Λ 0 ( q ) = { n : ɛ ( n , q ) = 1 }   , the set of quadratic residues modulo q   .
Clearly,
# ( Λ 0 ( q ) [ 0 , q ) ) = σ q > q 2 κ . (3)
Next we discuss some results from [15concerning the distribution of the squares modulo q   . Given K   , consider a fixed sequence ( ɛ 1 , . . . , ɛ K )   of zeros and ones. Assume that a 1 , . . . , a K   are distinct integers modulo an odd prime p   .
Set ν p ( ɛ 1 , . . . , ɛ K ; a 1 , . . . , a K ) = # { n : 0 n < p , ɛ ( n + a i , p ) = ɛ i for i = 1 , . . . , K } ,   that is, ν p ( ɛ 1 , . . . , ɛ K ; a 1 , . . . , a K )   counts the number of occurrences of ( ɛ 1 , . . . , ɛ K )   in translated copies of a 1 , . . . , a K   modulo p   . Then p 2 K K ( 3 + p ) ν p ( ɛ 1 , . . . , ɛ K ; a 1 , . . . , a K ) p 2 K + K ( 3 + p ) .   The “probability” of the occurrence of ( ɛ 1 , . . . , ɛ K )   in translated copies of ( a 1 , . . . , a K )   is P p ( ɛ 1 , . . . , ɛ K ; a 1 , . . . , a K ) = ν p ( ɛ 1 , . . . , ɛ K ; a 1 , . . . , a K ) p   and by the above result if ( a 1 , . . . , a K )   is fixed, then
P p ( ɛ 1 , . . . , ɛ K ; a 1 , . . . , a K ) 1 2 K as the odd prime p . (4)
Next we want to choose square free numbers q = p 1 p κ   , where p 1 , . . . , p κ   are distinct sufficiently large odd primes with good statistical properties.
A number n   is a square modulo q   if and only if it is a square modulo each of the primes p 1 , . . . , p κ .   By  4 given a 1 , . . . , a K   and keeping κ   , fixed as min { p 1 , . . . , p κ }   we have
P q ( ɛ 1 , . . . , ɛ K ; a 1 , . . . , a K ) ( 1 2 κ ) i = 1 K ɛ i ( 1 1 2 κ ) K i = 1 K ɛ i , (5)
that is, statistically squares modulo q   look like outcomes of independent Bernoulli trials with probabilities 1 2 κ   and ( 1 1 2 κ ) .   Without going into technical details of this fact from number theory, we just give an outline of a proof by induction on κ   . For κ = 1   ,  5 follows from  4 . Suppose κ > 1   and  5 holds for κ 1   . Set q 0 = p 1 p κ 1 .   For any possible choice of ɛ = ( ɛ 1 , . . . , ɛ K )   and ɛ = ( ɛ 1 , . . . , ɛ K )   , set W ( ɛ , ɛ ) = { n : 0 n < q , ɛ ( n + a i , q 0 ) = ɛ i and ɛ ( n + a i , p κ ) = ɛ i for i = 1 , . . . , K }   , W 0 ( ɛ ) = { n : 0 n < q 0 , ɛ ( n + a i , q 0 ) = ɛ i for i = 1 , . . . , K } ,   and W κ ( ɛ ) = { n : 0 n < p κ , ɛ ( n + a i , p κ ) = ɛ i for i = 1 , . . . , K } .   Observe that for any n   the numbers n + j q 0   , j = 0 , . . . , p κ 1   hit each residue class modulo p κ   exactly once, and ɛ ( n + j q 0 + a i , q 0 ) = ɛ ( n + a i , q 0 )   for all i   . Using this one can see that W 0 ( ɛ )   and W κ ( ɛ )   are independent in the sense that # W ( ɛ , ɛ ) = # W 0 ( ɛ ) # W κ ( ɛ )   . For ɛ = ( ɛ 1 , . . . , ɛ K )   , set G ( ɛ ) = { n : 0 n < q , ɛ ( n + a i , q ) = ɛ i for i = 1 , . . . , K } .   Then # G ( ɛ ) = # W ( ɛ , ɛ )   , where the sum is taken over all pairs ( ɛ , ɛ )   whose coordinatewise product is ɛ   . Taking the limit as min p 1 , . . . , p κ   goes to infinity of # G ( ɛ ) / q   , using  4 for the limit of # W κ ( ɛ ) / p κ   and  5 for the limit of # W 0 ( ɛ ) / q 0   , and noting that the only thing that matters in these limiting probabilites is the number of 1   's in the sequence, we have after setting m = i = 1 K ɛ i   , that the limiting value is 1 2 K i = 0 K m ( K m i ) ( 1 2 κ 1 ) m ( 1 1 2 κ 1 ) i = ( 1 2 κ ) m ( 1 1 2 κ ) K m ,   which is what we wanted.
Consider an infinite sequence of pairwise independent random variables X i : Y { 0 , 1 }   with P ( X i ( ω ) = 1 ) = 1 2 κ   , P ( X i ( ω ) = 0 ) = 1 1 2 κ .   Then E ( X i ( ω ) ) = 1 2 κ .   By the law of large numbers if ρ > 0   and K   , then P ( | 1 K i = 1 K X i ( ω ) 1 2 κ | ρ ) 0 .   Given ρ , ε 1 > 0   if K   is large enough, then P ( | 1 K i = 1 K X i ( ω ) 1 2 κ | ρ ) < ε 1 .   For odd primes p 1 < p 2 < . . . < p κ   put q = p 1 p κ .   Given distinct integers a 1 , . . . , a K   consider X i ( n ) = ɛ ( n + a i , q )   . By  5 as p 1   the variables X i ( n )   approximate independent random variables with Bernoulli distribution 1 2 κ   , ( 1 1 2 κ )   . Hence, given a sufficiently large K   if p 1   is sufficiently large then # { n [ 0 , q ) : | 1 K i = 1 K ɛ ( n + a i , q ) 1 2 κ | ρ } q < ε 1 .   In particular, we have
# { n [ 0 , q ) : i = 1 K ɛ ( n + a i , q ) K 2 κ + K ρ } < ε 1 q . (6)
For later arguments we now introduce some parameters. We will need a suitably small “leakage constant” γ ( 0 , 1 )   of the form γ = 2 c γ   where c γ N .   Then we work with κ > c γ .   Furthermore we use small constants ρ , ρ 1 > 0 .   For large K 1   we have
K 2 = d e f ( 1 + ρ 1 2 κ ) γ K 1 < ( 1 + ρ 1 ) ( 1 + ρ 1 2 κ ) γ K 1 and γ 2 κ / K 1 < ε 1 . (7)
Thus for a large K 1   we can choose p 1   such that
p 1 > max { K 1 + γ 2 κ , K 1 / ε 1 } (8)
and, in addition if p 1 > p 1   we have for any q = p 1 p κ ,   p 1 < . . . < p κ   ,
# { n [ 0 , q ) : | 1 K 1 i = 1 K 1 ɛ ( n + i , q ) 1 2 κ | ρ } < ε 1 q . (9)
Also, given any integers a 1 , . . . , a K 2   so that the difference of any two of them is less than p 1   we also have, after a simple change of notation in  6 
# { n [ 0 , q ) : i = 1 K 2 ɛ ( ( n + a i ) , q ) K 2 2 κ + K 2 ρ 1 } < ε 1 q , (10)
the negative sign in the first argument of ɛ ( , q )   is due to technical reasons in later arguments; it is clear that if n   takes all possible values modulo q   then so does n .   Let n 1 [ 0 , )   be the first number for which D ( K 1 , n 1 , q ) = d e f | 1 K 1 i = 1 K 1 ɛ ( n 1 + i , q ) 1 2 κ | < ρ .   Next choose the least n 2 n 1 + K 1   such that D ( K 1 , n 2 , q ) < ρ .   Continue and set J = { j N : 0 n j < q } .   If n [ 0 , q ) \ j J [ n j , n j + K 1 )   , then D ( K 1 , n , q ) ρ   should hold.
Hence, by  9 
# { n [ 0 , q ) : n j J [ n j , n j + K 1 ) } < ε 1 q . (11)
If j J   then by the definition of ɛ ( n , q )  
K 1 ( 1 2 κ ρ ) < # ( Λ 0 ( q ) [ n j + 1 , n j + K 1 ] ) < K 1 ( 1 2 κ + ρ ) , (12)
so that the number of quadratic residues modulo q   in the interval [ n j + 1 , n j + K 1 ]   is approximately K 1 / 2 κ .  
Definition 2. Set Λ γ ( q ) = Λ 0 ( q ) + { j Z : 0 j < γ 2 κ } ,   Λ ¯ γ ( q ) = Λ γ ( q ) + [ 0 , 1 ) = Λ 0 ( q ) + { x : 0 x < γ 2 κ } .   For ease of notation in the sequel if we have a fixed γ   and we do not want to emphasize the dependence on γ   we will write Λ ( q )   and Λ ¯ ( q )   , instead of Λ γ ( q )   and Λ ¯ γ ( q )   , respectively.
Remark 1. Here is a “heuristic” comment related to the above definition. If Λ 0 ( q )   equalled { k 2 κ : k Z }   , then λ ¯ ( Λ ¯ ( q ) )   would equal γ .   By results in [11for a fixed γ   as κ   goes to   , the normalized gaps between consecutive elements of Λ 0 ( q )   tends to a Poisson distribution. Since the normalizing factor is σ q   , the number of squares modulo q   approximately equals q / 2 κ   and the average value of the spacing between elements of Λ 0 ( q )   is very close to 2 κ   , if κ   and p 1   are both sufficiently large. For some different elements i , i Λ 0 ( q )   the intervals [ i , i + γ 2 κ )   and [ i , i + γ 2 κ )   might overlap.
This means that λ ¯ ( Λ ¯ ( q ) )   might be less than γ   , but the smaller γ   is, the closer λ ¯ ( Λ ¯ ( q ) ) / γ   is to 1   for large q   's. We will take advantage of this property.
Lemma 2. Given a positive integer κ   and ε   , ρ > 0   there exists p 1   such that if the odd primes satisfy p 1 < p 1 < . . . < p κ   and q = p 1 p κ   , then
# { n [ 0 , q ) : # ( ( ( n + Λ 0 ( q ) ) \ Λ ( q ) ) [ 0 , q ) ) < (13)
( 1 ρ ) ( 1 γ ) # ( Λ 0 ( q ) [ 0 , q ) ) } < ε q .
Remark 2. The heuristics behind  13 are the following. The number of n [ 0 , q )   for which n Λ ( q )   is a little less than γ q   , due to “overlaps”. This means that the number of those n   's for which n Λ ( q )   is a little larger than ( 1 γ ) q .   Now one can examine what happens when we look at translated copies of Λ 0 ( q ) .   Formula  13 says that for “most” translated copies of Λ 0 ( q )   we cannot have much less than ( 1 γ ) # ( Λ 0 ( q ) [ 0 , q ) )   elements of n + Λ 0 ( q )   outside Λ ( q ) .   Choose ρ 0 > 0   such that
( 1 1 ( 1 ρ 0 ) 2 γ ) > ( 1 ρ ) ( 1 γ ) . (14)
Recall from number theory that if p 1   is sufficiently large we have
( 1 ρ 0 ) q 2 κ < # ( Λ 0 ( q ) [ 0 , q ) ) = σ q < 1 ( 1 ρ 0 ) q 2 κ . (15)
  • Proof. We can assume that ε < 1 .   Take 0 < ε 1 < ε 2 / 32   and then choose K 1   and p 1   as above. By  8 and q > p 1   we have q > K 1 / ε 1   and by  11 
    # { n [ 0 , q ) : n j J [ n j , n j + K 1 ) } < ε 1 q (16)
    for a suitable index set J   , defined above, and for each j J   we have D ( K 1 , n j , q ) < ρ 1   for a suitable ρ 1 > 0 .   This means that
    K 1 ( 1 2 κ ρ 1 ) < # ( Λ 0 ( q ) [ n j + 1 , n j + K 1 ] ) < K 1 ( 1 2 κ + ρ 1 ) . (17)
    By Definition  2 for n [ 0 , q )   we have n + n Λ ( q )   if n + n i Λ 0 ( q )   holds for an i = 0 , . . . , γ 2 κ 1 .   Set Λ 0 j ( q ) = Λ 0 ( q ) [ n j + 1 , n j + K 1 ]   and Λ j ( q ) = ( γ 2 κ 1 i = 0 ( Λ 0 j ( q ) i ) )   for each j J .   Using the definition of K 2   in  7 , and  17 choose distinct numbers a i , j   , i = 1 , . . . , K 2   , so that Λ j ( q ) = γ 2 κ 1 i = 0 Λ 0 j ( q ) i A j = d e f K 2 i = 1 { a i , j } [ n j γ 2 κ , n j + K 1 ] .   Clearly, by the choice of p 1   in  8 the difference of any two of the a i , j   's is less than p 1   . This implies ( n + Λ 0 ( q ) ) Λ j ( q ) ( n + Λ 0 ( q ) ) ( A j ) .   Observe that there exists n Λ 0 ( q )   such that n + n A j   if and only if there exists i   such that n + n = a i , j   , that is, n + a i , j = n Λ 0 ( q ) .   Recall that n + a i , j Λ 0 ( q )   if and only if ɛ ( ( n + a i , j ) , q ) = 1 .   Set N j = { n [ 0 , q ) : i = 1 K 2 ɛ ( ( n + a i , j ) , q ) K 2 ( 1 2 κ + ρ 1 ) } .   If n N j   , n [ 0 , q )   then
    # ( ( n + Λ 0 ( q ) ) Λ j ( q ) ) < K 2 ( 1 2 κ + ρ 1 ) . (18)
    By  10 
    # N j < ε 1 q . (19)
    Here we remark that  10 can be used so that we have  19 for all j J .   Indeed, assume A [ γ 2 κ , K 1 ]   and A + n j = A j   then N j = N A = d e f { n [ 0 , q ) : a A ɛ ( ( n + a ) , q ) K 2 ( 1 2 κ + ρ 1 ) } .   There are 2 γ 2 κ + K 1 + 1   subsets of [ γ 2 κ , K 1 ]   . So, we can choose p 1   before  10 so that we have # N A < ε 1 q   for all subsets A   of [ γ 2 κ , K 1 ] .   If n N j   , n [ 0 , q )   then by  7 and  18 
    # ( ( n + Λ 0 ( q ) ) Λ j ( q ) ) < K 2 ( 1 2 κ + ρ 1 ) < (20)
    ( 1 + ρ 1 ) ( 1 + ρ 1 2 κ ) γ K 1 ( 1 2 κ + ρ 1 ) .
    On the other hand, by  16 
    q ε 1 q K 1 # J < q K 1 + 1 . (21)
    For 0 n < q   set J ( n ) = { j J : n N j }   .
    Consider an n   such that
    # J ( n ) > q 1 ε 1 K 1 ( 1 ε 1 ) . (22)
    Later we show that for most n   's this inequality holds.
    Observe that if x [ ( n j + K 1 ) + γ 2 κ 1 , n j 1 ] Λ ( q )   then there exists i { 0 , . . . , γ 2 κ 1 }   such that x i Λ 0 ( q )   and x i [ ( n j + K 1 ) , n j 1 ]   , that is, x i Λ 0 j ( q )   and hence x Λ j ( q ) .   Therefore, [ ( n j + K 1 ) + γ 2 κ 1 , n j 1 ] Λ ( q ) Λ j ( q ) .   We want to estimate # ( ( ( n + Λ 0 ( q ) ) \ Λ ( q ) ) [ 0 , q ) ) = # ( ( ( n + Λ 0 ( q ) ) \ Λ ( q ) ) ( q , 0 ] ) .   By  20 for any j J ( n )  
    # ( ( n + Λ 0 ( q ) ) Λ ( q ) [ ( n j + K 1 ) + γ 2 κ 1 , n j 1 ) < (23)
    ( 1 + ρ 1 ) ( 1 + ρ 1 2 κ ) γ K 1 ( 1 2 κ + ρ 1 ) .
    Put T n = { t Z : t ( q , 0 ] \ j J ( n ) [ ( n j + K 1 ) + γ 2 κ 1 , n j 1 ] } .   It is clear that
    ( n + Λ 0 ( q ) ) Λ ( q ) ( q , 0 ] (24)
    T n j J ( n ) ( n + Λ 0 ( q ) ) Λ ( q ) [ ( n j + K 1 ) + γ 2 κ 1 , n j 1 ] .
    We need to estimate # T n   . Since the intervals [ ( n j + K 1 ) , n j 1 ]   are disjoint and, with the possible exception of the one with the largest index, are subsets of ( q , 0 ]   we have by using  7 and  22  # T n < q # J ( n ) ( K 1 γ 2 κ ) < q # J ( n ) ( 1 ε 1 ) K 1 <   q q ( 1 ε 1 ) 2 K 1 ( 1 ε 1 ) K 1 = q ( 1 ( 1 ε 1 ) 2 ( 1 ε 1 ) ) < q c 1 ( ε 1 ) ,   where c 1 ( ε 1 ) 0   as ε 1 0 .   Now we use this,  23 and  24 to estimate # ( ( n + Λ 0 ( q ) ) Λ ( q ) ( q , 0 ] ) <   # J ( n ) ( 1 + ρ 1 ) ( 1 + ρ 1 2 κ ) γ K 1 ( 1 2 κ + ρ 1 ) + q c 1 ( ε 1 ) <   (using  21 ) ( q K 1 + 1 ) ( 1 + ρ 1 ) ( 1 + ρ 1 2 κ ) γ K 1 ( 1 2 κ + ρ 1 ) + q c 1 ( ε 1 ) =   ( 1 + K 1 q ) ( 1 + ρ 1 ) ( 1 + ρ 1 2 κ ) 2 γ q 1 2 κ + q c 1 ( ε 1 ) <   (using  8 and q > p 1 > K 1 / ε 1   ) ( 1 + ε 1 ) ( 1 + ρ 1 ) ( 1 + ρ 1 2 κ ) 2 γ q 1 2 κ + q c 1 ( ε 1 ) =   ( ( 1 + ε 1 ) ( 1 + ρ 1 ) ( 1 + ρ 1 2 κ ) 2 + 2 κ γ c 1 ( ε 1 ) ) γ q 1 2 κ = c 2 ( ε 1 , ρ 1 ) γ q 1 2 κ ,   where c 2 ( ε 1 , ρ 1 ) 1   as ε 1 , ρ 1 0 .   We can choose ε 1 , ρ 1 > 0   so that c 2 ( ε 1 , ρ 1 ) < 1 ( 1 ρ 0 ) .   This by  15 implies c 2 ( ε 1 , ρ 1 ) γ q 1 2 κ < 1 ( 1 ρ 0 ) 2 γ # ( Λ 0 ( q ) [ 0 , q ) ) .   By  14 we obtain
    # ( ( ( n + Λ 0 ( q ) ) \ Λ ( q ) ) [ 0 , q ) ) > (25)
    # ( Λ 0 ( q ) [ 0 , q ) ) ( 1 1 ( 1 ρ 0 ) 2 γ ) > # ( Λ 0 ( q ) [ 0 , q ) ) ( 1 ρ ) ( 1 γ ) .
    To prove  13 we need to show that there are sufficiently many n   's which satisfy the above inequality.
    Let b   be the number of n   's for which
    # J ( n ) q 1 ε 1 K 1 ( 1 ε 1 ) . (26)
    If we can show that b < ε q   , then we have finished the proof of Lemma  2 since if  22 holds for an n   then we have  25 . If n   satisfies  26 then by the definition of J ( n )   from  21 we infer that n N j   for at least ε 1 1 ε 1 K 1 q   many j   's.
    Hence, using  19 and  21  b ε 1 1 ε 1 K 1 q j J # N j ε 1 q ( q K 1 + 1 ) < 2 ε 1 q 2 K 1   which implies b 2 ε 1 1 ε 1 q < ε q .  

3 Periodic rearrangements

Assume F R   is periodic by τ N   and if x F   then [ x , x + 1 ) F .   Given a natural number τ > τ   , the τ   -periodic rearrangement of F   is denoted by F τ   and it is periodic by τ ,   and F τ [ 0 , τ ) = [ 0 , τ / τ τ ) F .  
Lemma 3. Given τ ,   F ,   ρ > 0   there exists M ρ   such that if τ > M ρ   is a prime number then for any n N   and x R   , if τ | m   then
1 m k = n n + m 1 χ F τ ( x + k 2 ) ( 1 ρ ) λ ¯ ( F ) . (27)
  • Proof. It is enough to show the lemma if τ = m .   Furthermore, χ F τ   is periodic by τ   and if x F τ   then [ x , x + 1 ) F τ   . Hence it is sufficient to verify  27 for n = 1 ,   since { n , n + 1 , . . . , n + τ 1 }   forms a complete residue system modulo τ   for any choice of n   .
    Given ε , ρ > 0   choose K   such that if X i ( ω )   are independent random variables with P ( X i ( ω ) = 1 ) = P ( X i ( ω ) = 0 ) = 1 2   , then P ( | 1 K i = 1 K X i ( ω ) 1 2 | ρ ) < ε .   Now, set X i , j ( n ) = ɛ ( n + j + i τ , τ )   . We use some results from [15.
    There exists M ρ > K   such that if the prime number τ > M ρ ,   then for all j = 0 , . . . , τ 1   # { n [ 0 , τ ) : | 1 K i = 1 K ɛ ( n + j + i τ , τ ) 1 2 | ρ } < ε τ .   We conclude
    # { n [ 0 , τ ) : max j = 0 , . . . , τ 1 | 1 K i = 1 K ɛ ( n + j + i τ , τ ) 1 2 | ρ } < τ ε τ . (28)
    We can also suppose that M ρ   is so large that for all τ > M ρ   we have
    τ ( K + 2 ) < min { ε τ τ , τ } . (29)
    By  28 there exists E 0   periodic by τ   such that if n E 0   , then for all j = 0 , . . . , τ 1  
    i = 1 K ɛ ( n + j + i τ , τ ) > ( 1 2 ρ ) K (30)
    and
    # ( E 0 [ 0 , τ ) ) < τ ε τ . (31)
    Recall that if n + j + i τ 0   m o d   τ   and ɛ ( n + j + i τ , τ ) = 1   , then there are two solutions of k 2 n + j + i τ   modulo τ .   Assume x R   is arbitrary. Consider x + k 2   . If n E 0 + x   , then  30 implies that for all j = 0 , . . . , τ 1  
    i = 1 K ɛ ( x + n + j + i τ , τ ) > ( 1 2 ρ ) K . (32)
    If ɛ ( x + n + j + i τ , τ ) = 1 ,   then there exists k   such that k 2 x + n + j + i τ   m o d   τ   , that is, x + k 2 n + j + i τ   and if x + n + j + i τ 0   modulo τ   we have two solutions m o d   τ .   Let N 1 ( 0 , τ )   be the least element of ( Z \ E 0 ) + x [ 0 , τ τ ( K + 2 ) ) .   Given N s 1   choose N s   so that it is the least element of ( Z \ E 0 ) + x [ N s 1 + τ ( K + 1 ) , τ τ ( K + 2 ) )   in case this set is nonempty. After S   many steps the previous set is empty and we stop and obtain N 1 , . . . , N S .   Then
    ( Z [ 0 , τ τ ( K + 2 ) ) ) \ S l = 1 [ N l , N l + τ ( K + 1 ) ) E 0 + x . (33)
    Hence, by  29 and  31 , if τ   is sufficiently large
    # ( ( Z [ 0 , τ ) ) \ S l = 1 [ N l , N l + τ ( K + 1 ) ) ) < 2 ε τ τ . (34)
    Recalling that for any n Z   we have at most two solutions of x + k 2 n   m o d   τ   we obtain # { k [ 0 , τ ) Z : x + k 2 S l = 1 [ N l , N l + τ ( K + 1 ) ) + τ Z } < 4 ε τ τ .   Let K l = { k [ 0 , τ ) Z : x + k 2 [ N l , N l + τ ( K + 1 ) ) + τ Z } .   To verify  27 we need to estimate k = 1 τ χ F τ ( x + k 2 ) .   In  38 we will consider subsums k K l χ F τ ( x + k 2 ) .   If N l + j F τ   for a j { 0 , . . . , τ 1 }   , then N l [ 0 , τ τ ( K + 2 ) )   and N l + j + i τ [ N l , N l + τ ( K + 1 ) ) [ 0 , τ τ )   for i = 1 , . . . , K   which, recalling that F   is periodic by τ   and since τ τ τ / τ τ ,   F τ [ 0 , τ τ ) = F [ 0 , τ τ )   , we have N l + j + i τ F τ .   This means that from χ F τ ( N l + j ) = 1   , it follows that χ F τ ( N l + j + i τ ) = 1   for i = 1 , . . . , K .   If for an i   , ɛ ( x + N l + j + i τ , τ ) = 1   and x + N l + j + i τ 0   modulo τ   , then there exist exactly two k 1   , k 2   , different modulo τ   , such that
    x + k 1 2 x + k 2 2 N l + j + i τ m o d τ . (35)
    For x ,   N l ,   j   fixed there is at most one i { 1 , . . . , K }   for which x + N l + j + i τ 0   m o d   τ .   Hence for the other K 1   values we have two solutions of  35 whenever ɛ ( x + N l + j + i τ , τ ) = 1   . For these solutions, k 1   and k 2   , we have
    χ F τ ( x + k 1 2 ) = χ F τ ( x + k 2 2 ) = 1 . (36)
    Using again that F   is periodic by τ   and by the definition of F τ   we have F [ N l , N l + τ 1 ) = F τ [ N l , N l + τ 1 )   we infer
    # { j : N l + j F τ , j = 0 , . . . , τ 1 } = λ ¯ ( F ) τ . (37)
    By  31 ,  33 and  34 it is clear that if ε   is sufficiently small, with K   and τ   are sufficiently large, we have S τ ( K 1 ) = S τ ( K + 1 ) ( 1 2 K + 1 ) > ( 1 ρ ) τ .   If we add  32 with n = N l   for all j = 0 , . . . , τ 1   by using  36 and  37 we find
    k K l χ F τ ( x + k 2 ) 2 ( 1 2 ρ ) ( K 1 ) τ λ ¯ ( F ) . (38)
    Adding  38 for all l = 1 , . . . , S   k = 1 τ χ F τ ( x + k 2 ) S 2 ( 1 2 ρ ) ( K 1 ) τ λ ¯ ( F ) > 2 ( 1 2 ρ ) ( 1 ρ ) τ λ ¯ ( F ) .   Therefore, if ρ   is chosen to be sufficiently small, we have 1 τ k = 1 τ χ F τ ( x + k 2 ) > ( 1 ρ ) λ ¯ ( F ) .  

4 K M   families

Definition 3. For a positive integer M   we say that a periodic function or a “random variable”, X : R R   is conditionally M     0.99   distributed on the set Λ   , which is periodic by the same period, if X ( x ) { 0 , 0.99 , 0.99 1 2 , . . . , 0.99 2 M + 1 }   , and λ ¯ ( { x Λ : X ( x ) = 0.99 2 l } ) = 0.99 2 M + l 1 λ ¯ ( Λ )   for l = 0 , . . . , M 1 .   (We regard R   as being periodic by 1   with λ ¯ ( R ) = 1   and if Λ = R   then we just simply say that X   is M     0.99   -distributed.) By an obvious adjustment this definition will also be used for random variables X ¯   defined on [ 0 , 1 )   equipped with the Lebesgue measure λ .   If we have two “random variables” X 1   and X 2   both conditionally M     0.99   distributed on Λ   then they are called pairwise independent (on Λ   ) if for any y 1 , y 2 R  
λ ¯ { x Λ : X 1 ( x ) = y 1 and X 2 ( x ) = y 2 } λ ¯ ( Λ ) = (39)
λ ¯ ( { x Λ : X 1 ( x ) = y 1 } ) λ ¯ ( { x Λ : X 2 ( x ) = y 2 } )
or, equivalently, λ ¯ { x Λ : X 1 ( x ) = y 1 and X 2 ( x ) = y 2 } / λ ¯ ( Λ ) =
( λ ¯ ( { x Λ : X 1 ( x ) = y 1 } ) / λ ¯ ( Λ ) ) ( λ ¯ ( { x Λ : X 2 ( x ) = y 2 } ) / λ ¯ ( Λ ) )
If we say that X 1   and X 2   are pairwise independent, without specifying Λ   then we mean Λ = R   .
We will use the following simple properties. Assume Λ 1   and Λ 2   are two disjoint sets with a common period. If X 1   and X 2   are conditionally M     0.99   distributed on Λ 1   and on Λ 2   , then X 1   (and similarly X 2   ) is conditionally M     0.99   distributed on Λ 1 Λ 2   . If, in addition X 1   and X 2   are pairwise independent on each Λ 1   and Λ 2   , then X 1   and X 2   are pairwise independent on Λ 1 Λ 2   . We note the last property depends on X 1   and X 2   having the same distribution on Λ 1   and Λ 2   . Similar properties hold if we have finitely many functions X 1 , . . . , X K   with the same conditional distribution.
Definition 4. We say that a set P N   has sufficiently large complement if there are infinitely many primes relatively prime to any number in P .  
Definition 5. Assume q = p 1 p κ   , where p 1 < . . . < p κ   are odd primes. Set Λ 0 ( q ) = { n Λ 0 ( q ) : p j n , for all j = 1 , . . . , κ } .   If n Λ 0 ( q )   , then there are 2 κ   many solutions of x 2 n   m o d   q   , also observe that for fixed κ  
if p 1 , then # ( Λ 0 ( q ) [ 0 , q ) ) # ( Λ 0 ( q ) [ 0 , q ) ) 1 . (40)
Given γ ( 0 , 1 )   we also put Λ γ ( q ) = Λ 0 ( q ) + { j Z : 0 j < γ 2 κ } ,   Λ ¯ γ ( q ) = Λ γ ( q ) + [ 0 , 1 ) = Λ 0 ( q ) + { x : 0 x < γ 2 κ } .   In the sequel often if γ   is fixed we will suppress the dependence on γ   by writing Λ ( q )   and Λ ¯ ( q )   instead of Λ γ ( q )   and Λ ¯ γ ( q )   , respectively.
Definition 6. Suppose K , M N   , Λ R   is periodic by q ~ .   There is a parameter γ   associated to Λ   . (If Λ = R   then q ~ = γ = 1   .
Otherwise one should think of Λ = Λ ¯ γ ( q ~ )   and γ   is the parameter used in the definition of Λ   .) In the sequel we assume that P N   has sufficiently large complement. A K M   family living on Λ   with input parameters δ > 0 ,   Ω   , Γ > 1   , A N ,   P   with output objects τ   , f h   , f h , x   , X h   ( h = 1 , . . . , K   ); E δ   , ω ( x )   , α ( x )   and τ ( x )   is a system satisfying:
  • (i) There exist a period τ   , functions f h : R [ 0 , )   , pairwise independent, conditionally M     0.99   -distributed on Λ   “random” variables X h : R R   , for h = 1 , . . . , K ,   and a set E δ   such that all these objects are periodic by τ   where τ   is an integer multiple of q ~   .
  • (ii) We have λ ¯ ( E δ ) < δ   . For all x E δ   , there exist 0 f h , x f h   , ω ( x ) > α ( x ) > A ,   τ ( x ) < τ   such that ω 2 ( x ) < τ ,   ω ( x ) α ( x ) > Ω τ ( x )   ; moreover if α ( x ) n < n + m ω ( x )   and τ ( x ) | m   , then for all h = 1 , . . . , K ,  
    1 m k = n n + m 1 f h ( x + k 2 ) 1 m k = n n + m 1 f h , x ( x + k 2 ) > X h ( x ) . (41)
  • (iii) For all p P   , ( τ ( x ) , p ) = 1 ,   ( τ , p ) = 1 .  
  • (iv) For all x Λ \ E δ   , for all h { 1 , . . . , K }  
    f h , x ( x + j + τ ( x ) ) = f h , x ( x + j ) (42)
    whenever α 2 ( x ) j < j + τ ( x ) ω 2 ( x ) .  
  • (v) Finally, for h = 1 , . . . , K   1 τ 0 τ f h = ¯ f h < Γ γ 2 M + 1 .  
Remark 3. The input parameters in the above definition should be regarded as something given in advance while the output objects are defined and constructed later. The most important property is  41 , while the numerous other technical properties are needed in order to verify by mathematical induction the existence of K M   families.
If x   is not in the exceptional set E δ   then  41 says that the average over multiples of τ ( x )   of each f h   along squares staying in the window [ α ( x ) , ω ( x ) ]   dominates X h ( x ) .   The auxiliary functions f h , x   are technical aides carried along in the induction argument to ensure this domination. In  42 we claim that these functions appear to be periodic in the window [ α 2 ( x ) , β 2 ( x ) ] ,   that is, when squares stay in the window [ α ( x ) , β ( x ) ] .  
Lemma 4. Let M N   , Λ = R   (this implies q ~ = γ = 1   ). Then for each positive integer K   and parameters δ > 0 ,   Ω , Γ > 1   , A N ,   and P N   such that P   has sufficiently large complement there exist a K M   family living on R   .

4.1 Putting K M   families on quadratic residue classes

The proof of Lemma  4 is quite involved. It will be done by mathematical induction. In this section we assume that K M   families on R   exist for a fixed K N   for all possible parameter values.
We will use the following lemma about “putting a K M   -family on a residue class”. We assume that P ¯   is a set of natural numbers with sufficiently large complement and we have a number q ~   such that
( q ~ , p ) = 1 for all p P ¯ , q ~ = p 0 , 1 p 0 , κ , (43)
and p 0 , 1 < . . . < p 0 , κ   are odd primes.
We also assume that a constant γ = 2 c γ   , the so called “leakage constant” is given with c γ N   and κ > c γ   . This γ   is used in the definition of Λ ¯ ( q ~ ) = Λ ¯ γ ( q ~ )   .
Lemma 5. Let M N   be given and suppose for some K N   that K M   families exist on R   for all possible parameter values.
Suppose that P ¯   , q ~   and the parameter γ   associated to Λ ¯ ( q ~ )   satisfy the above assumptions. In addition, let δ > 0 ,   Ω , Γ > 1   , and A N   be given. Then for the above input parameters there exists a K M   family living on Λ ¯ ( q ~ )   with output objects τ ¯   , f ¯ h   , f ¯ h , x   , X ¯ h   ( h = 1 , . . . , K   ); E ¯ δ   , ω ¯ ( x )   , α ¯ ( x )   and τ ¯ ( x )   .
  • Proof. Using P = P ¯ { q ~ }   , choose a K M   family living on R   with input parameters δ ,   Ω = Ω q ~ ,   Γ ,   A .   This K M   family provides us with τ   , f h   , f h , x   , X h   , E δ ,   ω ( x ) ,   α ( x )   , and τ ( x )   , satisfying (i)-(v) of Definition  6 . Especially,
    for all p P ¯ { q ~ } we have ( τ ( x ) , p ) = 1 and ( τ , p ) = 1 . (44)
    We construct a new K   -system marked by overlines which lives on Λ ¯ ( q ~ )   and is periodic by τ ¯ = τ q ~   .
    Set f ¯ h ( x ) = f h ( x ) q ~ / 2 κ   if x [ j q ~ , j q ~ + γ 2 κ )   for a j Z   , otherwise put f ¯ h ( x ) = 0 .   Then f ¯ h   is periodic by τ q ~   .
    Next we define X ¯ h ( x )   so that X ¯ h ( x ) = X h ( x )   for x Λ ¯ ( q ~ )   , and otherwise let X ¯ h ( x ) = 0 .   Clearly, X ¯ h   is periodic by q ~   and is supported on Λ ¯ ( q ~ )   .
    Next we check the distribution of X ¯ h ( x ) | Λ ¯ ( q ~ ) .   We know that X h ( x + τ ) = X h ( x )   . Since from  44 it follows that ( τ , q ~ ) = 1   the numbers j τ   , j = 0 , . . . , q ~ 1   cover all residue classes modulo q ~ .   Now we can compute λ ¯ ( { x Λ ¯ ( q ~ ) : X ¯ h ( x ) = 0.99 2 l } ) =   λ ¯ ( { x R : X ¯ h ( x ) = 0.99 2 l } ) =   1 τ q ~ λ ( { x [ 0 , τ q ~ ) : X ¯ h ( x ) = 0.99 2 l } ) =   1 τ q ~ j = 0 q ~ 1 λ ( { x [ j τ , ( j + 1 ) τ ) : X ¯ h ( x ) = 0.99 2 l } ) =   1 τ q ~ j = 0 q ~ 1 λ ( { x [ 0 , τ ) : X ¯ h ( x + j τ ) = 0.99 2 l } ) =   1 τ q ~ ( # Λ ( q ~ ) [ 0 , q ~ ) ) λ ( { x [ 0 , τ ) : X h ( x ) = 0.99 2 l } ) =   (using that # ( Λ ( q ~ ) [ 0 , q ~ ) ) / q ~ = λ ¯ ( Λ ¯ ( q ~ ) )   ) λ ¯ ( Λ ¯ ( q ~ ) ) λ ¯ ( { x R : X h ( x ) = 0.99 2 l } ) = 1 τ λ ¯ ( Λ ¯ ( q ~ ) ) τ 0.99 2 M + l 1 =   λ ¯ ( Λ ¯ ( q ~ ) ) 0.99 2 M + l 1 .   Thus the “conditional distribution” of X ¯ h   on Λ ¯ ( q ~ )   is M     0.99 .   Set ϒ = { 0 , 0.99 , 0.99 2 1 , . . . , 0.99 2 M + 1 }   and ϒ + = ϒ \ { 0 } .   Next we show that the functions X ¯ h   are pairwise independent on Λ ¯ ( q ~ )   . Suppose h 1 h 2   . First assume y 1 , y 2 ϒ +   . Then the above argument shows
    λ ¯ ( { x Λ ¯ ( q ~ ) : X ¯ h j ( x ) = y j } ) = λ ¯ ( { x R : X h j ( x ) = y j } ) λ ¯ ( Λ ¯ ( q ~ ) ) (45)
    for j = 1 , 2 .   A similar argument shows
    λ ¯ ( { x Λ ¯ ( q ~ ) : X ¯ h 1 ( x ) = y 1 and X ¯ h 2 ( x ) = y 2 } ) = (46)
    λ ¯ ( { x R : X h 1 ( x ) = y 1 and X h 2 ( x ) = y 2 } ) λ ¯ ( Λ ¯ ( q ~ ) ) .
    The range of X ¯ h j   and X h j   equals ϒ = ϒ + { 0 }   and  45 holds for all y j ϒ +   . Therefore,
    λ ¯ ( { x Λ ¯ ( q ~ ) : X ¯ h j ( x ) = 0 } ) = λ ¯ ( { x R : X h j ( x ) = 0 } ) λ ¯ ( Λ ¯ ( q ~ ) ) (47)
    should also hold for j = 1 , 2 .   Recalling that X h j   are M 0.99   distributed and pairwise independent on R   , using for a fixed y 2 ϒ +   ,  46 for all y 1 ϒ +   , and using  45 with j = 2   one can deduce
    λ ¯ ( { x Λ ¯ ( q ~ ) : X ¯ h 1 ( x ) = 0 and X ¯ h 2 ( x ) = y 2 } ) = (48)
    λ ¯ ( { x Λ ¯ ( q ~ ) : X ¯ h 2 ( x ) = y 2 } )
    λ ¯ ( { x Λ ¯ ( q ~ ) : X ¯ h 1 ( x ) ϒ + and X ¯ h 2 ( x ) = y 2 } ) =
    λ ¯ ( { x R : X h 1 ( x ) = 0 and X h 2 ( x ) = y 2 } ) λ ¯ ( Λ ¯ ( q ~ ) ) .
    Similarly, one can see that for any y 1 ϒ +  
    λ ¯ ( { x Λ ¯ ( q ~ ) : X ¯ h 1 ( x ) = y 1 and X ¯ h 1 ( x ) = 0 } ) = (49)
    λ ¯ ( { x R : X h 1 ( x ) = y 1 and X h 2 ( x ) = 0 } ) λ ¯ ( Λ ¯ ( q ~ ) ) .
    Recalling that X h 2   is M 0.99   -distributed on R   and using  48 for all y 2 ϒ +   and  47 with j = 1   one can see that
    λ ¯ ( { x Λ ¯ ( q ~ ) : X ¯ h 1 ( x ) = 0 and X ¯ h 2 ( x ) = 0 } ) = (50)
    λ ¯ ( { x Λ ¯ ( q ~ ) : X ¯ h 1 ( x ) = 0 } )
    λ ¯ ( { x Λ ¯ ( q ~ ) : X ¯ h 1 ( x ) = 0 and X ¯ h 2 ( x ) ϒ + } ) =
    λ ¯ ( { x R : X h 1 ( x ) = 0 and X h 2 ( x ) = 0 } ) λ ¯ ( Λ ¯ ( q ~ ) ) .
    Since X h 1   and X h 2   are pairwise independent and M 0.99   -distributed on R   , from ( 45 - 50 ) it follows that X ¯ h 1   and X ¯ h 2   are pairwise independent on Λ ¯ ( q ~ ) .   Put E ¯ δ = E δ   . Clearly, E ¯ δ   is periodic by τ ¯   and this completes the proof of (i).
    It is clear that λ ¯ ( E ¯ δ ) = λ ¯ ( E δ ) < δ .   For x E ¯ δ   , set f ¯ h , x ( x ) = f h , x ( x ) q ~ / 2 κ   if x [ j q ~ , j q ~ + γ 2 κ )   for a j Z   , otherwise put f ¯ h , x ( x ) = 0 .   Clearly, f ¯ h , x f ¯ h .   For all x E ¯ δ   , h { 1 , . . . , K }   , let α ¯ ( x ) = α ( x )   , ω ¯ ( x ) = ω ( x )   , τ ¯ ( x ) = q ~ τ ( x )   , then we have ω ¯ ( x ) α ¯ ( x ) > Ω τ ( x ) = Ω q ~ τ ( x ) = Ω τ ¯ ( x )   .
    Now we verify  41 for f ¯ h   , f ¯ h , x   and X ¯ h   . Assume x Λ ¯ ( q ~ ) \ E ¯ δ   , α ¯ ( x ) = α ( x ) n < n + m ω ( x ) = ω ¯ ( x ) ,   τ ¯ ( x ) = τ ( x ) q ~ | m ,   in fact, it is enough to consider the case when τ ( x ) q ~ = m = τ ¯ ( x )   . We claim that for any h = 1 , . . . , K   we have 1 m k = n n + m 1 f h , x ( x + k 2 ) 1 m k = n n + m 1 f ¯ h , x ( x + k 2 ) ,   then we will apply  41 for f h   , f h , x   and X h   .
    Since τ ( x ) q ~ = m   and x Λ ¯ ( q ~ ) \ E ¯ δ   implies x E δ   , using  42 several times we obtain 1 m k = n n + m 1 f h , x ( x + k 2 ) = 1 m k = n n + τ ( x ) 1 j = 0 q ~ 1 f h , x ( x + ( k + j τ ( x ) ) 2 ) =   1 m k = n n + τ ( x ) 1 q ~ f h , x ( x + k 2 ) .   From x Λ ¯ ( q ~ ) ,   it follows that there exists k 0   such that x k 0 2 + [ i k 0 q ~ , i k 0 q ~ + γ 2 κ )   , that is, x + k 0 2 [ i k 0 q ~ , i k 0 q ~ + γ 2 κ )   for an i k 0 Z ,   and k 0 2 Λ 0 ( q ~ )   . Recall that there are 2 κ   many solutions of x 2 k 0 2   modulo q ~ .   Since ( τ ( x ) , q ~ ) = 1   for a fixed k   , the set k + j τ ( x )   forms a complete residue system modulo q ~   as j   runs from 0   to q ~ 1   , hence there are at least 2 κ   many j k , l   's l = 1 , . . . , 2 κ   with ( k + j k , l τ ( x ) ) 2 k 0 2   modulo q ~   , where k 0   is defined above. Recalling that x Λ ¯ ( q ~ ) \ E ¯ δ   , for any k = n , . . . , n + τ ( x ) 1   , we have j = 0 q ~ 1 f ¯ h , x ( x + ( k + j τ ( x ) ) 2 ) l = 1 2 κ f ¯ h , x ( x + ( k + j k , l τ ( x ) ) 2 ) =   l = 1 2 κ f h , x ( x + ( k + j k , l τ ( x ) ) 2 ) q ~ 2 κ 2 κ f h , x ( x + k 2 ) q ~ 2 κ .   Therefore, 1 m k = n n + m 1 f ¯ h , x ( x + k 2 ) = 1 m k = n n + τ ( x ) 1 j = 0 q ~ 1 f ¯ h , x ( x + ( k + j τ ( x ) ) 2 )   applying  41 for f h   , f h , x   and X h   1 m k = n n + τ ( x ) 1 q ~ f h , x ( x + k 2 ) = 1 m k = n n + m 1 f h , x ( x + k 2 ) X h ( x ) X ¯ h ( x ) .   This proves (ii) for x Λ ¯ ( q ~ ) \ E ¯ δ   . Since X ¯ h ( x ) = 0   for x R \ ( Λ ¯ ( q ~ ) E ¯ δ )   for these x   's  41 holds obviously for f ¯ h   , f ¯ h , x   and X ¯ h   .
    Using  44 and ( q ~ , p ) = 1   for all p P ¯   we have ( τ ¯ ( x ) , p ) = ( q ~ τ ( x ) , p ) = 1   and ( τ q ~ , p ) = ( τ ¯ , p ) = 1   for all p P ¯ .   This proves (iii).
    To verify (iv), suppose x Λ ¯ ( q ~ ) \ E ¯ δ   , h { 1 , . . . , K }   and α 2 ( x ) = α ¯ 2 ( x ) j < j + q ~ τ ( x ) ω ¯ 2 ( x ) = ω 2 ( x ) .   If x + j [ j q ~ , j q ~ + γ 2 κ )   for a j Z   , then
    f ¯ h , x ( x + j ) = f h , x ( x + j ) q ~ / 2 κ = f h , x ( x + j + τ ( x ) ) q ~ / 2 κ = . . . = (51)
    f h , x ( x + j + q ~ τ ( x ) ) q ~ / 2 κ = f ¯ h , x ( x + j + q ~ τ ( x ) )
    when α 2 ( x ) = α ¯ 2 ( x ) j < j + q ~ τ ( x ) ω ¯ 2 ( x ) = ω 2 ( x )   .
    If x + j [ j q ~ , j q ~ + γ 2 κ )   for all j Z   , then f ¯ h , x ( x + j ) = 0 = f ¯ h , x ( x + j + q ~ τ ( x ) ) .   This verifies (iv).
    Next we prove (v)
    1 τ q ~ 0 τ q ~ f ¯ h = ¯ f ¯ h Γ γ 2 M + 1 . (52)
    Indeed, 1 τ q ~ j = 0 q ~ 1 0 τ f ¯ h ( x + j τ ) d x = 1 τ 0 τ 1 q ~ j = 0 q ~ 1 f ¯ h ( x + j τ ) d x = ( * ) .   To continue this computation recall that from ( τ , q ~ ) = 1   it follows that x + j τ   hits each residue class modulo q ~   once as j   varies from 0   to q ~ 1   and f h ( x + j τ ) = f h ( x )   for all j   . Thus, recalling that γ   associated to Λ = R   equals 1   and using (v) for f h   ( * ) = 1 τ 0 τ 1 q ~ f h ( x ) q ~ 2 κ γ 2 κ d x = 1 τ γ 0 τ f h ( x ) d x Γ γ 2 M + 1 .   This proves  52 .

4.2 Proof of Lemma  4 

Recall q = p 1 p κ   where p 1 , . . . , p κ   are odd primes. By results in [11when κ   and p 1   are large the normalized gaps between consecutive elements of Λ 0 ( q )   approximate a Poisson distribution and the average gap size is 2 κ .   Hence, if γ   is small then most of the gaps between points of Λ 0 ( q )   are bigger than γ 2 κ   .
Considering the sets Λ ¯ γ ( q )   , due to small gaps, there might be some overlaps and hence
λ ¯ ( Λ ¯ γ ( q ) ) < γ and λ ¯ ( R \ Λ ¯ γ ( q ) ) > 1 γ . (53)
However, the closer γ   to 0   , the smaller the percentage of “loss due to overlaps”. Thus taking into consideration  40 as well one can choose constants C γ > 1 > C ~ γ > 0   , κ γ ,   such that for all κ > κ γ   there exists p κ   for which from p κ < p 1 < . . . < p κ   , q = p 1 p κ   it follows that
C γ > γ λ ¯ ( Λ ¯ γ ( q ) ) and C ~ γ λ ¯ ( R \ Λ ¯ γ ( q ) ) < 1 γ γ 2 . (54)
We can also require that C γ 1   and C ~ γ 1   as γ 0 + .   In  54 the second order term in ( 1 γ γ 2 )   appears for technical reasons. It is clear that ( 1 γ γ 2 ) / ( 1 γ ) 1   as γ 0 + .   In order to apply Lemma  5 we need to choose a positive “leakage constant,” γ   , which remains fixed during all steps of the leakage producing the ( K + 1 ) M   family. We choose γ 0 < 10 6   so that if γ < γ 0   , γ = 2 c γ   , c γ N   there exists κ γ κ γ   such that for all κ > κ γ   there exists p γ , κ > p κ   for which if p γ , κ < p 1 < . . . < p κ   , q = p 1 p κ ,   then
λ ¯ ( Λ ¯ γ ( q ) ) > 9 γ / 10 and λ ¯ ( R \ Λ ¯ γ ( q ) ) < 1 9 γ 10 . (55)
Recall that Γ   is one of the input parameters of Lemma  4 . We also assume that γ   is chosen so that C γ < Γ   for C γ   defined in  54 and C ~ γ > 1 10 6   .
From now on a value of γ < γ 0   , with γ = 2 c γ   , c γ N   satisfying the above assumptions is fixed. We will write Λ ( q )   , Λ ¯ ( q )   and Λ ¯ ( q )   instead of Λ γ ( q )   , Λ ¯ γ ( q )   and Λ ¯ γ ( q )   , respectively.
Next, after giving an outline we start the details of the proof of Lemma  4 .

4.2.1 Setting up the induction argument for Lemma  4 

We proceed by mathematical induction.
Here is a short explanation of our plan. We assume that K M   families living on R   exist for all possible input parameter choices. Let δ > 0 ,   Ω ,   Γ > 1   , A N   and P N   be given. We will define our ( K + 1 ) M   family with these input parameters. We can assume that P   is closed under products.
During the definition of the ( K + 1 ) M   family another, “inner” finite induction is used (with respect to L   ) which is called the leakage process.
This technically delicate process is the focus of the next several sections.
During this process we will use Lemma  5 to define families which are almost ( K + 1 ) M   families on sets of the type Λ ¯ ( q )   , except for the new functions f K + 1 , L   and X K + 1 , L   . Each f K + 1 , L   is the indicator function of a set. As L   grows the support of f K + 1 , L   decreases. Lemma  2 and Lemma  3 are used to ensure that “squares hit sufficiently often” the support of f K + 1 , L   . (This motivated the term “leakage” since the values of f K + 1 , L   leak onto some larger sets when we consider averages along the squares.) This also requires that before defining f K + 1 , L   one uses Lemma  3 to choose τ L 1   and make a τ L 1   rearrangement to yield an intermediate function f K + 1 , L 1   . At the same time we must keep track of our new random variable X K + 1 , L   and other auxiliary functions. It is essential in this induction that we can vary τ   and κ .   To help the reader going through the details of the proof here is an outline of the main features of the various sections of the proof. We hope this outline might help prevent the reader from becoming lost in the details of the proof.
In Section  4.2.2 we start the leakage process with a K M   family periodic by τ 0   , consisting of functions f h , 0   , X h , 0   for h = 1 , . . . , K   . We also define f K + 1 , 0 1   and X K + 1 , 0   . At this stage f K + 1 , 0   is supported on R   . During the leakage process the size of the support of the functions f K + 1 , L   is shrinking and we are interested in how much of f K + 1 , L   is “leaking” onto larger sets.
In Section  4.2.3 we assume that we have accomplished step L 1   of the leakage and we have a family periodic by τ L 1   , consisting of functions f h , L 1 ,   X h , L 1   for h = 1 , . . . , K + 1   . We also introduce the auxiliary sets S L 1 , l   , l = 0 , . . . , L 1   used to describe the distribution of X K + 1 , L 1   .
In Section  4.2.4 we choose a prime number τ L 1   which is much larger than τ L 1   and by using Lemma  3 we perform a τ L 1   rearrangement of the family coming from Section  4.2.3 . This way we obtain a family periodic by τ L 1   , consisting of functions f h , L 1   , X h , L 1   . The auxiliary sets used for describing the distribution of X K + 1 , L 1   are denoted by S L 1 , l   , l = 0 , . . . , L 1 .   In Section  4.2.5 we choose a κ L   and a square free number q L = p 1 , L q κ L , L   such that 2 κ L   is much larger than τ L 1   . The average value of the difference between elements of Λ 0 ( q L )   is close to 2 κ L   . We introduce some auxiliary sets, among them Φ L   and Ψ L   , so that Φ L R \ Λ ¯ ( q L ) Ψ L   and these two auxiliary sets consist of intervals of the form [ j τ L 1 , ( j + 1 ) τ L 1 ) ,   j Z .   If 2 κ L   is much larger than τ L 1   , then λ ¯ ( Φ L )   and λ ¯ ( Ψ L )   both approximately equal λ ¯ ( R \ Λ ¯ ( q L ) ) .   To define our ( K + 1 ) M   family on Ψ L   (which is approximately R \ Λ ¯ ( q L )   ) we will use mainly the functions coming from Section  4.2.5 . In particular, we define X h , L = X h , L 1   if h K + 1   and x Φ L   .
In Section  4.2.6 by using Lemma  5 we put a K M   family onto Λ ¯ ( q L )   .
This will yield functions f ¯ h , L   , X ¯ h , L   periodic by τ ¯ L q L   . For h = 1 , . . . , K   we define X h , L   on Λ ¯ ( q L )   by using X ¯ h , L   . For h = 1 , . . . , K   our functions will be sums of f h , L 1   restricted to Ψ L   and of the functions f ¯ h , L   “living” on Λ ¯ ( q L ) .   This combined family will be periodic by τ L = q L τ ¯ L τ L 1 .   The “leakage” is done when we define f K + 1 , L   so that it equals the restriction of f K + 1 , L 1   onto the set Ψ L   . This means that the support F L   of f K + 1 , L   will have a very small intersection with Λ ¯ ( q L )   . “Most” of F L   will be a subset of R \ Λ ¯ ( q L )   and will approximately equal the auxiliary set S L , 0   . The nested sequence S L , l   , l = 0 , . . . , L   will describe the distribution X K + 1 , L   , the larger l   , the smaller the values X K + 1 , L   can take on S L , l \ S L , l 1   .
In Section  4.2.7 we make the calculations needed to show that we have enough “leakage” from the support of f K + 1 , L   so that we have the domination inequality  41 with f K + 1 , L   and X K + 1 , L   .
Finally, in Section  4.2.8 we terminate the leakage process when we have reached a suitably large L = L L   . The functions f h , L   for h = 1 , . . . , K + 1   will yield the functions f h   we need for the ( K + 1 ) M   family. For h = 1 , . . . , K   the functions X h   of the ( K + 1 ) M   family will equal the functions X h , L   .
To define X K + 1   we use the sets S L , l   , l = 0 , . . . , L   related to the distribution of X K + 1 , L   . We will choose X K + 1   so that it is M     0.99   distributed and less or equal than X K + 1 , L   .
After this outline we turn to the details of the proof.
Naturally, one needs to start the induction by showing that 1 M   families exist. We could just simply say that the 0 M   families are the empty families, but we will be more specific. To obtain 1 M   families we need to do a leakage process without any reference to 0 M   families. In the proof below we will indicate which parts need to be altered, or else, are not needed for the first step of our induction, that is when K + 1 = 1 .   At this stage there are no h   's satisfying h = 1 , . . . , K   and hence the formulae involving f h   , X h   etc. for these values of h   are vacuous.
Assume K M   families exist; again, for K = 0   it is the empty family.
We have to build a ( K + 1 ) M   family.
Choose a positive integer L   such that
( 1 γ 2 ) L < 1 2 M . (56)
The inner finite induction, the “leakage” will halt at some L L .   Fix constants Γ 0 . . . Γ L   such that
C γ Γ L < Γ for all L = 0 , . . . , L . (57)
Put δ L = δ 4 ( L + 1 ) for L = 0 , . . . , L .   We will choose sufficiently small positive constants ρ   and ρ .   Finally, we set P 0 = P P 0 . . . P L   where P   and each P j   contains infinitely many primes and all their possible products, but numbers in different sets are relatively prime; moreover P 0   has sufficiently large complement.

4.2.2 Step L = 0   of the leakage process

We put f K + 1 , 0 1   . For any x R   , set f K + 1 , 0 , x = f K + 1 , 0 ,   F 0 = R ,   S 0 , 0 = R   , r 0 = 1 .   So, λ ¯ ( F 0 ) = 1   and X K + 1 , 0 = d e f ( 1 ρ ) C ~ γ = ( 1 ρ ) C ~ γ λ ¯ ( F 0 )   , In case K = 0   , we want to construct a 1 M   family.
We also put E 0 = E δ 0 = .   Then we choose a sufficiently large τ 0   , and functions α 0 ( x )   , ω 0 ( x )   , τ 0 ( x )   taking integer values for all x R   (in fact, these functions can be constant on R   ), such that the following assumptions hold: ω 0 ( x ) > α 0 ( x ) > A ,   τ 0 ( x ) < τ 0   , ω 0 2 ( x ) < τ 0 ,   ω 0 ( x ) α 0 ( x ) > Ω τ 0 ( x ) = Ω 0 τ 0 ( x )   , and for all p P 0   , ( τ 0 ( x ) , p ) = 1 ,   ( τ 0 , p ) = 1 .   For example, we could take α 0 ( x ) = A + 1   , τ 0 ( x )   to be the smallest odd prime which is relatively prime to all elements of P 0   , ω 0 ( x ) = τ 0 ( x ) Ω ( A + 2 )   and τ 0   be the smallest prime relatively prime to the elements of P 0   and greater than ( ω 0 ( x ) ) 2   .
By our choice of f K + 1 , 0 = f 1 , 0 = f K + 1 , 0 , x = f 1 , 0 , x 1   for any m N   we have 1 m k = n n + m 1 f 1 , 0 ( x + k 2 ) 1 m k = n n + m 1 f 1 , 0 , x ( x + k 2 ) > X 1 , 0 ( x ) .   It is also clear that for all x R   , f 1 , 0 , x ( x + j + τ 0 ( x ) ) = f 1 , 0 , x ( x + j )   for any j R   . This completes stage 0   of the leakage in case K = 0 .   In case K > 0   we proceed as follows: Choose a K M   family on R   with input constants δ 0 = δ 4 ( L + 1 )   , Ω 0 = Ω   , Γ 0 C γ < Γ   , A 0 = A   , P 0   . Then there exist a period τ 0   ; functions f h , 0 : R [ 0 , )   , pairwise independent M     0.99   -distributed “random” variables X h , 0 : R R   , for h = 1 , . . . , K ,   a set E δ 0   periodic by τ 0 ,   with λ ¯ ( E δ 0 ) < δ 0 .   Moreover, for all x E δ 0   , there exist ω 0 ( x ) > α 0 ( x ) > A ,   τ 0 ( x ) < τ 0   such that ω 0 2 ( x ) < τ 0 ,   ω 0 ( x ) α 0 ( x ) > Ω τ 0 ( x ) = Ω 0 τ 0 ( x )   , if α 0 ( x ) n < n + m ω 0 ( x )   , and τ 0 ( x ) | m   then for all h = 1 , . . . , K + 1   (for h = 1 , . . . , K   by the definition of the K M   family, for h = K + 1   by the above definition) there exists 0 f h , 0 , x f h , 0   such that 1 m k = n n + m 1 f h , 0 ( x + k 2 ) 1 m k = n n + m 1 f h , 0 , x ( x + k 2 ) > X h , 0 ( x ) .   For all p P 0   , ( τ 0 ( x ) , p ) = 1 ,   ( τ 0 , p ) = 1 .   For all x E δ 0   and all h = 1 , . . . , K + 1 ,   f h , 0 , x ( x + j + τ 0 ( x ) ) = f h , 0 , x ( x + j )   whenever α 0 2 ( x ) j < j + τ 0 ( x ) ω 0 2 ( x ) .   Finally, 1 τ 0 0 τ 0 f h , 0 = ¯ f h , 0 < C γ Γ 0 2 M + 1 ,   for h = 1 , . . . , K .   We put E 0 = E 0 = E 0 =   and E 0 = E δ 0 E 0 E 0 E 0 .  

4.2.3 The setting after step L 1   of the leakage

Assume we have accomplished step L 1   of the leakage process. We have an exceptional set E L 1 = E δ L 1 E L 1 E L 1 E L 1   with
λ ¯ ( E L 1 ) < L ( L + 1 ) δ ; (58)
P L 1 = P P L . . . P L ;   there exists a period τ L 1   such that E L 1   , X h , L 1 ,   f h , L 1   , ( h = 1 , . . . , K + 1 )   are periodic by τ L 1 ,   f h , L 1 : R [ 0 , )   , the “random” variables X h , L 1 : R R   are pairwise independent for h = 1 , . . . , K + 1 ,   X h , L 1   are M     0.99   -distributed for h = 1 , . . . , K   (later there will be comments about the distribution of X K + 1 , L 1   ). For all x E L 1   there exist 0 f h , L 1 , x f h , L 1   and ω L 1 ( x ) > α L 1 ( x ) > A ,   τ L 1 ( x ) < τ L 1   such that ω L 1 2 ( x ) < τ L 1 ,   ω L 1 ( x ) α L 1 ( x ) > Ω τ L 1 ( x )   ; moreover if α L 1 ( x ) n < n + m ω L 1 ( x )   and τ L 1 ( x ) | m   , then for all h = 1 , . . . , K + 1   ,
1 m k = n n + m 1 f h , L 1 ( x + k 2 ) 1 m k = n n + m 1 f h , L 1 , x ( x + k 2 ) > X h , L 1 ( x ) ; (59)
for all p P L 1   , ( τ L 1 ( x ) , p ) = 1 ,   ( τ L 1 , p ) = 1 ;   for all x E L 1   , f h , L 1 , x ( x + j + τ L 1 ( x ) ) = f h , L 1 , x ( x + j )   whenever α L 1 2 ( x ) j < j + τ L 1 ( x ) ω L 1 2 ( x )   for all h { 1 , . . . , K + 1 }   . Finally, for h = 1 , . . . , K  
1 τ L 1 0 τ L 1 f h , L 1 = ¯ f h , L 1 < C γ Γ L 1 2 M + 1 . (60)
We emphasize that we do not expect that  60 holds for h = K + 1   . On the other hand, we suppose that the values of f K + 1 , L 1   are 0   or 1   , that is, it is an indicator function.
If L 1 = 0   , then X K + 1 , L 1   is constant and no assumptions are needed about its distribution.
If L 1 > 0   , that is, L 2   then we give the extra assumptions about the distribution of X K + 1 , L 1   as follows. Recall F 0 = R .   Set F L 1 = { x : f K + 1 , L 1 ( x ) = 1 }   and r L 1 = λ ¯ ( F L 1 ) λ ¯ ( F L 2 ) < 1 .   We also assume
1 2 γ < r L 1 < 1 γ 2 , (61)
λ ¯ ( F L 1 ) = r 1 r L 1 = r 0 r L 1 ,   the sets S L 1 , 0 . . . S L 1 , L 1 = R   are defined so that
1 1 ρ λ ¯ ( F L 1 ) > λ ¯ ( S L 1 , 0 ) > ( 1 ρ ) λ ¯ ( F L 1 ) , (62)
if x S L 1 , 0   then X K + 1 , L 1 ( x ) = ( 1 ρ ) C ~ γ = ( 1 ρ ) C ~ γ λ ¯ ( F 0 ) .   For l = 0 , . . . , L 1   we have
1 ( 1 ρ ) r 0 r l λ ¯ ( S L 1 , 0 ) > λ ¯ ( S L 1 , l ) > 1 ρ r 0 r l λ ¯ ( S L 1 , 0 ) , (63)
which is equivalent to
1 ( 1 ρ ) λ ¯ ( S L 1 , 0 ) > λ ¯ ( F l ) λ ¯ ( S L 1 , l ) > ( 1 ρ ) λ ¯ ( S L 1 , 0 ) . (64)
If x S L 1 , l \ S L 1 , l 1   for l { 1 , . . . , L 1 } ,   then
X K + 1 , L 1 ( x ) = ( 1 ρ ) r 0 r l C ~ γ = ( 1 ρ ) λ ¯ ( F l ) C ~ γ . (65)
The sets S L 1 , l   are increasing almost by a factor 1 / r l   in size whereas the value of X K + 1 , L 1   on the difference is decreasing by a factor r l   . We also assume that F L 1   has the property that if x F L 1   then [ x , x + 1 ) F L 1 .  

4.2.4 Rearrangement with respect to τ L 1  

Since the set F L 1   is periodic by τ L 1   and is the union of some integral intervals we can apply Lemma  3 . We choose M ρ / 2   such that for all prime numbers τ L 1 > M ρ / 2   if we consider F L 1 τ L 1   , the τ L 1   periodic rearrangement of F L 1   , then for any x R   if τ L 1 | m   , then
1 m k = n n + m 1 χ F L 1 τ L 1 ( x + k 2 ) ( 1 ρ 2 ) λ ¯ ( F L 1 ) . (66)
We will choose and fix a sufficiently large prime τ L 1 P L 1 .   Now we modify our sets and functions so that they are all periodic with respect to τ L 1   . Since we are going to define functions which are periodic by τ L 1 ,   it is sufficient to define them on [ 0 , τ L 1 ) .   If x [ 0 , τ L 1 / τ L 1 τ L 1 )   and the righthandside of the equation is defined at x   , set
f h , L 1 ( x ) = f h , L 1 ( x ) , h = 1 , . . . , K + 1 ,
α L 1 ( x ) = α L 1 ( x ) ,
ω L 1 ( x ) = ω L 1 ( x ) ,
τ L 1 ( x ) = τ L 1 ( x ) ,
X h , L 1 ( x ) = X h , L 1 ( x ) , h = 1 , . . . , K + 1 .
On [ τ L 1 / τ L 1 τ L 1 , τ L 1 )   we define all the above functions equal to zero with the exception of the functions X h , L 1   , h = 1 , . . . , K + 1   . For these functions some minor adjustments will be made on this interval in order to ensure that they are pairwise independent for h = 1 , . . . , K + 1   and are M     0.99   -distributed for h = 1 , . . . , K .   We can also assume that X K + 1 , L 1   has constant value ( 1 ρ ) λ ¯ ( F L 1 ) C ~ γ   on [ τ L 1 / τ L 1 τ L 1 , τ L 1 )   . When L 1 = 0   then this implies that X K + 1 , L 1   takes this constant value on R .   We define E L 1   so that it is periodic by τ L 1   and
E L 1 [ 0 , τ L 1 ) = (67)
( E L 1 [ 0 , ( τ L 1 τ L 1 1 ) τ L 1 ) ) [ ( τ L 1 τ L 1 1 ) τ L 1 , τ L 1 ) .
By choosing τ L 1   sufficiently large we can make 0 < λ ¯ ( E L 1 ) λ ¯ ( E L 1 )   as small as we wish, hence, using  58 we can assume that τ L 1   is chosen so large that λ ¯ ( E L 1 ) < L ( L + 1 ) δ .   When L 1 = 0   then
X K + 1 , 0 ( x ) = ( 1 ρ ) λ ¯ ( F 0 ) C ~ γ for all x R . (68)
If L 1 > 0   , that is, L 2   we need to deal with the auxiliary sets related to the distribution of X K + 1 , L 1 .   We put S L 1 , L 1 = R   . Observe that  67 holds with E L 1 ,   E L 1   being replaced by S L 1 , L 1 ,   and S L 1 , L 1 = R ,   respectively.
For l = 0 , . . . , L 2   we define the sets S L 1 , l   so that they are periodic by τ L 1   and we have S L 1 , l [ 0 , τ L 1 ) = S L 1 , l [ 0 , ( τ L 1 / τ L 1 1 ) τ L 1 ) .   The above definitions imply
X K + 1 , L 1 ( x ) = ( 1 ρ ) C ~ γ λ ¯ ( F 0 ) for x S L 1 , 0 , and (69)
X K + 1 , L 1 ( x ) = ( 1 ρ ) C ~ γ λ ¯ ( F l ) for x S L 1 , l \ S L 1 , l 1 , l = 1 , . . . , L 1 .
We can also assume that τ L 1   is chosen so large that from  62 ,  63 and  64 we can deduce
1 1 ρ λ ¯ ( F L 1 ) > λ ¯ ( S L 1 , 0 ) > ( 1 ρ ) λ ¯ ( F L 1 ) (70)
and for l = 0 , . . . , L 1  
1 ( 1 ρ ) r 0 r l λ ¯ ( S L 1 , 0 ) > λ ¯ ( S L 1 , l ) > ( 1 ρ ) 1 r 0 r l λ ¯ ( S L 1 , 0 ) , (71)
or, equivalently,
1 1 ρ λ ¯ ( S L 1 , 0 ) > λ ¯ ( F l ) λ ¯ ( S L 1 , l ) > ( 1 ρ ) λ ¯ ( S L 1 , 0 ) . (72)
Set F L 1 = { x : f K + 1 , L 1 ( x ) = 1 }   , that is, F L 1 [ 0 , τ L 1 ) = F L 1 [ 0 , τ L 1 / τ L 1 τ L 1 ) = F L 1 τ L 1 [ 0 , τ L 1 / τ L 1 τ L 1 )   and f K + 1 , L 1 ( x ) = χ F L 1 τ L 1 ( x )   for all x R   . For the case L 1 = 0   we note that F 0 [ 0 , τ L 1 ) = [ 0 , τ L 1 / τ L 1 τ L 1 ) .   By  66 for any x R   from τ L 1 | m   , it follows that letting f K + 1 , L 1 , x = f K + 1 , L 1 = f K + 1 , L 1 = χ F L 1 τ L 1 :  
1 m k = n n + m 1 f K + 1 , L 1 ( x + k 2 ) = (73)
1 m k = n n + m 1 f K + 1 , L 1 , x ( x + k 2 ) > ( 1 ρ 2 ) λ ¯ ( F L 1 ) .
This formula is the main motivation for introducing the τ L 1   periodic rearrangements. Observe that if τ L 1   is large then λ ¯ ( F L 1 ) / λ ¯ ( F L 1 )   is very close to 1 ;   namely we can suppose that
1 γ 10 < λ ¯ ( F L 1 ) λ ¯ ( F L 1 ) < 1 + γ 10 . (74)
Hence, by  70 if L 2   we can assume that τ L 1   is so large that
1 1 ρ λ ¯ ( F L 1 ) > λ ¯ ( S L 1 , 0 ) > ( 1 ρ ) λ ¯ ( F L 1 ) (75)
holds as well.
If x [ 0 , τ L 1 ) \ E L 1   , then put α L 1 ( x ) = α L 1 ( x ) ,   ω L 1 ( x ) = ω L 1 ( x ) ,   τ L 1 ( x ) = τ L 1 ( x ) < τ L 1 τ L 1 .   We have ( ω L 1 ( x ) ) 2 < τ L 1 ,  
ω L 1 ( x ) α L 1 ( x ) > Ω τ L 1 ( x ) , (76)
if α L 1 ( x ) n < n + m ω L 1 ( x )   , τ L 1 ( x ) = τ L 1 ( x ) | m   , then letting f h , L 1 , x = f h , L 1 , x   and recalling x E L 1   and  67 implies that x + k 2 [ 0 , τ L 1 / τ L 1 τ L 1 )   for k { n , . . . , n + m 1 }   we infer
1 m k = n n + m 1 f h , L 1 , x ( x + k 2 ) = 1 m k = n n + m 1 f h , L 1 , x ( x + k 2 ) > (77)
X h , L 1 ( x ) = X h , L 1 ( x ) .
For all x [ 0 , τ L 1 ) \ E L 1   , h { 1 , . . . , K + 1 }   , if α L 1 2 ( x ) j < j + τ L 1 ( x ) ω L 1 2 ( x ) ,   f h , L 1 , x ( x + j + τ L 1 ( x ) ) = f h , L 1 , x ( x + j + τ L 1 ( x ) ) = f h , L 1 , x ( x + j ) = f h , L 1 , x ( x + j ) .   We also have
¯ f h , L 1 ¯ f h , L 1 < C γ Γ L 1 2 M + 1 , (78)
for h = 1 , . . . , K .   We extend the definition of f h , L 1 , x   to arbitrary x E L 1   by choosing j   such that x j τ L 1 [ 0 , τ L 1 ) \ E L 1   and setting f h , L 1 , x ( x ) = f h , L 1 , x j τ L 1 ( x j τ L 1 ) .   By periodicity with respect to τ L 1   , the above estimates hold for any x E L 1 .  

4.2.5 Choice of κ L   , q L   , Φ L   , Ψ L   , and X h , L   on R \ Λ ¯ ( q L )  

Next we choose a number q L P L ,   q L = p 1 , L p κ L , L   , p 1 , L < . . . < p κ L , L   , where κ L   and p 1 , L   are both sufficiently large. Recall from Remark  1 that the average gap length between points of Λ 0 ( q L )   is approximately 2 κ L   and we can assume that it is much larger than τ L 1   . The normalized difference between elements of Λ 0 ( q L )   approximates Poisson distribution by the results in [11. We put Φ ~ L = { x : d i s t ( x , Λ ¯ ( q L ) ) > 2 τ L 1 } ,   Φ L = { [ j τ L 1 , ( j + 1 ) τ L 1 ) : Φ ~ L [ j τ L 1 , ( j + 1 ) τ L 1 ) } ,   Φ ^ L = { x : d i s t ( x , Λ ¯ ( q L ) ) > τ L 1 } ,   Ψ ^ L = { x : d i s t ( x , R \ Λ ¯ ( q L ) ) τ L 1 } ,   Ψ L = { [ j τ L 1 , ( j + 1 ) τ L 1 ) : Ψ ^ L [ j τ L 1 , ( j + 1 ) τ L 1 ) } ,   and finally Ψ ~ L = { x : d i s t ( x , R \ Λ ¯ ( q L ) ) 2 τ L 1 } .   It is clear that
Φ ~ L Φ L Φ ^ L R \ Λ ¯ ( q L ) Ψ ^ L Ψ L Ψ ~ L . (79)
The sets Φ L   and Ψ L   are periodic by τ L 1 q L   and the sets Φ ~ L   , Φ ^ L   , Ψ ~ L   , and Ψ ^ L   are periodic by q L   . If κ L   is sufficiently large, then 2 κ L   and hence most of the gaps between points of Λ 0 ( q L )   are much larger than τ L 1 .   In the sequel by   we mean that if τ L 1   , p 1 , L   and 2 κ L   (compared to τ L 1   ) are sufficiently large, then the ratio of the two sides of   is sufficiently close to 1   . Since Λ ¯ ( q L )   consists of intervals of length γ 2 κ L   which is much larger than τ L 1   , we have
λ ¯ ( Ψ ~ L ) λ ¯ ( Φ ~ L ) λ ¯ ( Ψ L ) λ ¯ ( Φ L ) λ ¯ ( Ψ ^ L ) λ ¯ ( Φ ^ L ) , (80)
λ ¯ ( Φ L ) λ ¯ ( R \ Λ ¯ ( q L ) ) λ ¯ ( Ψ L ) and λ ¯ ( R \ Λ ¯ ( q L ) ) λ ¯ ( Ψ L ) . (81)
Set E L = R \ ( Λ ¯ ( q L ) Φ ~ L ) ,   this will be part of the new exceptional set E L   . We also introduce E ~ L = R \ ( Λ ¯ ( q L ) Φ L )   which is a subset of E L   . It is clear that E L   is periodic by q L   , while E ~ L   is periodic by τ L 1 q L   . Choosing κ L   and p 1 , L   sufficiently large we can ensure that λ ¯ ( E ~ L ) λ ¯ ( E L ) < δ / 4 L .   Set
X h , L ( x ) = X h , L 1 ( x ) if h K + 1 and x Φ L . (82)
Since Φ L   consists of intervals of the form [ j τ L 1 , ( j + 1 ) τ L 1 ) ,   this definition and the remark after the definition of X h , L 1   in Section  4.2.4 ensures that the functions X h , L   are pairwise independent for h = 1 , . . . , K + 1   and are conditionally M     0.99   distributed on Φ L   for h = 1 , . . . , K   .
On E ~ L   we define X h , L   for h = 1 , . . . , K + 1   so that they are pairwise independent on E ~ L   , furthermore X h , L   are conditionally M     0.99   -distributed on E ~ L   for h = 1 , . . . , K ,   X K + 1 , L ( x ) = ( 1 ρ ) λ ¯ ( F L 1 ) C ~ γ   on E ~ L   , X h , L   are periodic on E ~ L   by τ L 1 q L   for h = 1 , . . . , K + 1 .   This way the X h , L   's are defined on Φ L E ~ L = R \ Λ ¯ ( q L )   . In the next section after putting a K M   family on Λ ¯ ( q L )   we complete their definition. We set E L = Ψ L E L 1 .   Next we consider some sets which are used to describe the distribution of X K + 1 , L   .
If L = 1   set S 1 , 0 = R \ Λ ¯ ( q 1 )   and S 1 , 1 = R .   If L 2   first we define S L , l   for l = 0 , . . . , L 1   so that S L , l Φ L = S L 1 , l Φ L   for l = 0 , . . . , L 1 .   We choose S L , l   so that S L , l ( R \ Φ L ) =   for l = 0 , . . . , L 2 .   We choose S L , L 1   so that S L , L 1 = E ~ L ( S L 1 , L 1 Φ L ) = E ~ L Φ L = R \ Λ ¯ ( q L ) .   Finally, we set S L , L = R ,   then S L , L \ S L , L 1 = Λ ¯ ( q L ) .   We have by  69 , (for the case L = 1   by  68 ) and  82 
X K + 1 , L ( x ) = ( 1 ρ ) λ ¯ ( F 0 ) C ~ γ for x S L , 0 , and (83)
X K + 1 , L ( x ) = ( 1 ρ ) λ ¯ ( F l ) C ~ γ for x S L , l \ S L , l 1 , l = 1 , . . . , L 1 .
The case when l = L   will be considered in  86 .
Let F L = Ψ L F L 1 .   Using the fact that F L 1   is periodic by τ L 1   and Ψ L   is the union of some intervals of the form [ j τ L 1 , ( j + 1 ) τ L 1 )   and is periodic by τ L 1 q L   one can easily see that λ ¯ ( F L ) = λ ¯ ( Ψ L ) λ ¯ ( F L 1 ) .   Moreover, r L = d e f λ ¯ ( F L ) λ ¯ ( F L 1 ) = λ ¯ ( Ψ L ) λ ¯ ( F L 1 ) λ ¯ ( F L 1 ) λ ¯ ( Ψ L ) λ ¯ ( Φ L ) λ ¯ ( R \ Λ ¯ ( q L ) ) .   If τ L 1   , κ L   and p 1 , L   are sufficiently large by  81 we have λ ¯ ( Ψ L ) λ ¯ ( F L 1 ) λ ¯ ( F L 1 ) < 1 γ 1 γ γ 2 λ ¯ ( R \ Λ ¯ ( q L ) ) .   By  54 we obtain
C ~ γ r L = C ~ γ λ ¯ ( F L ) λ ¯ ( F L 1 ) = C ~ γ λ ¯ ( Ψ L ) λ ¯ ( F L 1 ) λ ¯ ( F L 1 ) < 1 γ . (84)
By  53 ,  55 ,  74 and λ ¯ ( Ψ L ) λ ¯ ( R \ Λ ¯ ( q L ) )   , if κ L   and p 1 , L   are sufficiently large then
1 2 γ < r L < 1 γ 2 . (85)
We set
X K + 1 , L ( x ) = ( 1 ρ ) λ ¯ ( F L ) C ~ γ for x S L , L \ S L , L 1 = Λ ¯ ( q L ) . (86)
If L = 1   then λ ¯ ( F 1 ) = λ ¯ ( Ψ 1 ) λ ¯ ( F 0 ) λ ¯ ( R \ Λ ¯ ( q 1 ) )   and λ ¯ ( S 1 , 0 ) = λ ¯ ( R \ Λ ¯ ( q 1 ) ) .   Furthermore, λ ¯ ( S 1 , 1 ) = λ ¯ ( R ) = 1 ,   r 1 λ ¯ ( R \ Λ ¯ ( q 1 ) )   . Hence, if τ 0   , κ 1   and p 1 , 1   are sufficiently large we have by  53 and  54  1 2 γ < r 1 < 1 γ 2 ,  
1 1 ρ λ ¯ ( F 1 ) > λ ¯ ( S 1 , 0 ) > ( 1 ρ ) λ ¯ ( F 1 ) , (87)
1 ( 1 ρ ) r 0 r 1 λ ¯ ( S 1 , 0 ) > λ ¯ ( S 1 , 1 ) > ( 1 ρ ) 1 r 0 r 1 λ ¯ ( S 1 , 0 ) (88)
and
1 1 ρ λ ¯ ( S 1 , 0 ) > λ ¯ ( F 1 ) λ ¯ ( S 1 , 1 ) > ( 1 ρ ) λ ¯ ( S 1 , 0 ) . (89)
This shows that  91 and  92 below hold for L = 1   and l = 1 .   For L = 1   and l = 0   ,  91 and  92 are obvious.
If L 2   we have λ ¯ ( S L , 0 ) = λ ¯ ( Φ L ) λ ¯ ( S L 1 , 0 )   and using  75 and  80 , if κ L   and p 1 , L   are sufficiently large then
1 1 ρ λ ¯ ( F L ) > λ ¯ ( S L , 0 ) > ( 1 ρ ) λ ¯ ( F L ) . (90)
It is also clear that λ ¯ ( S L , l ) = λ ¯ ( Φ L ) λ ¯ ( S L 1 , l )   for l = 0 , . . . , L 2   and λ ¯ ( S L , L 1 ) = ( λ ¯ ( Φ L ) + λ ¯ ( E ~ L ) ) λ ¯ ( S L 1 , L 1 ) = λ ¯ ( R \ Λ ¯ ( q L ) )   hence, for l = 0 , . . . , L 1   if κ L   and p 1 , L   are large λ ¯ ( S L , l ) / λ ¯ ( S L 1 , l ) r L .   Using  71 and λ ¯ ( S L , l ) r L λ ¯ ( S L 1 , l )   , we have for l = 0 , . . . , L 1  
1 ( 1 ρ ) r 0 r l λ ¯ ( S L , 0 ) > λ ¯ ( S L , l ) > ( 1 ρ ) 1 r 0 r l λ ¯ ( S L , 0 ) (91)
and by  72 
1 1 ρ λ ¯ ( S L , 0 ) > λ ¯ ( F l ) λ ¯ ( S L , l ) > ( 1 ρ ) λ ¯ ( S L , 0 ) . (92)
From λ ¯ ( S L , L ) = 1   and  90 it follows that 1 1 ρ λ ¯ ( S L , 0 ) > λ ¯ ( F L ) λ ¯ ( S L , L ) > ( 1 ρ ) λ ¯ ( S L , 0 ) .   Using the fact that λ ¯ ( F L ) = r 0 r L   we find that  91 and  92 hold for l = L   as well.
Applying Lemma  2 with κ L ,   ε = δ / 4 L   and sufficiently small ρ ~ > 0   yields p 1 , L   sufficiently large so that q L = p 1 , L p κ L , L   , with p 1 , L < p 1 , L   satisfies  13 .
Denote by E ¯ L   the set of those n   's for which # ( ( ( n + Λ 0 ( q L ) ) \ Λ ( q L ) ) [ 0 , q L ) ) < ( 1 ρ ~ ) ( 1 γ ) # ( Λ 0 ( q L ) [ 0 , q L ) ) .   By Lemma  2  # ( E ¯ L [ 0 , q L ) ) < δ 4 L q L .   Set E L = { x R : x E ¯ L } .   Then λ ¯ ( E L ) < δ / 4 L   and if x E L   we have
1 q L # { k [ 0 , q L ) Z : x + k 2 Λ ( q L ) } (93)
1 q L # { k [ 0 , q L ) Z : x + k 2 Λ ( q L ) , k 2 Λ 0 ( q L ) }   1 q L 2 κ L # ( ( ( x + Λ 0 ( q L ) ) \ Λ ( q L ) ) [ 0 , q L ) )   1 q L 2 κ L ( # ( ( ( x + Λ 0 ( q L ) ) \ Λ ( q L ) ) [ 0 , q L ) ) # ( ( Λ 0 ( q L ) \ Λ 0 ( q L ) ) [ 0 , q L ) ) )   1 q L 2 κ L ( ( ( 1 ρ ~ ) ( 1 γ ) # ( Λ 0 ( q L ) [ 0 , q L ) ) ) # ( ( Λ 0 ( q L ) \ Λ 0 ( q L ) ) [ 0 , q L ) ) ) = ( * ) .   To continue the above estimate we use the fact that we can assume that p 1 , L   is so large that # ( ( Λ 0 ( q L ) \ Λ 0 ( q L ) ) [ 0 , q L ) ) < ρ ~ ( 1 γ ) # ( Λ 0 ( q L ) [ 0 , q L ) )   and hence ( * ) 1 q L 2 κ L ( 1 2 ρ ~ ) ( 1 γ ) # ( Λ 0 ( q L ) [ 0 , q L ) ) = ( * * ) .   By using  3 we can finish with the inequality
( * * ) > 1 q L 2 κ L ( 1 2 ρ ~ ) ( 1 γ ) ( 1 ρ ~ ) q L 2 κ L = ( 1 2 ρ ~ ) ( 1 ρ ~ ) ( 1 γ ) . (94)

4.2.6 Putting K M   families on Λ ¯ ( q L )  

We put
f K + 1 , L = f K + 1 , L 1 χ Ψ L , and f K + 1 , L , x = f K + 1 , L for any x R . (95)
Then indeed, F L = { x : f K + 1 , L ( x ) = 1 } = Ψ L F L 1 ,   and we have ¯ f K + 1 , L = λ ¯ ( F L ) .   Choose P L P L   such that it contains infinitely many primes and all their possible products, moreover all numbers in P L   are relatively prime to q L P L   and set P ¯ L = P P L P L + 1 . . . P L .   When K = 0   , that is when constructing a 1 M   family we do not have to put anything on Λ ¯ ( q L )   . We just set τ ¯ L = 1   , E δ L =   and skip the following application of Lemma  5 and continue reading this section from the place which is marked by a   a few paragraphs below.
For the choice of the K M   family living on Λ ¯ ( q L )   use Lemma  5 with P ¯ L ,   δ L = δ / 4 ( L + 1 )   , Ω L = Ω q L τ L 1   , Γ L   and A .  
  • (i) We obtain functions f ¯ h , L   , X ¯ h , L   periodic by τ ¯ L q L   for h = 1 , . . . , K .   The functions X ¯ h , L : R R   are pairwise independent and conditionally M     0.99   distributed on Λ ¯ ( q L ) .   There exists E δ L   periodic by q L τ ¯ L   .
  • (ii) We have λ ¯ ( E δ L ) < δ L = δ / 4 ( L + 1 )   . For all x E δ L   , there exist 0 f ¯ h , L , x f ¯ h , L   and ω ¯ L ( x ) > α ¯ L ( x ) > A   , τ ¯ L ( x ) < τ ¯ L q L ,   ω ¯ L 2 ( x ) < τ ¯ L q L   , ω ¯ L ( x ) α ¯ L ( x ) > Ω L τ ¯ L ( x ) = Ω q L τ L 1 τ ¯ L ( x ) .   Moreover, if α ¯ L ( x ) n < n + m ω ¯ L ( x )   and τ ¯ L ( x ) | m   then for h = 1 , . . . , K   ,
    1 m k = n n + m 1 f ¯ h , L ( x + k 2 ) 1 m k = n n + m 1 f ¯ h , L , x ( x + k 2 ) > X ¯ h , L ( x ) . (96)
  • (iii) For all p P ¯ L ,   ( τ ¯ L ( x ) , p ) = 1   , ( τ ¯ L q L , p ) = 1   .
  • (iv) For all x Λ ¯ ( q L ) \ E δ L ,   for all h = 1 , . . . , K   , f ¯ h , L , x ( x + j + τ ¯ L ( x ) ) = f ¯ h , L , x ( x + j ) ,   when α ¯ L 2 ( x ) j < j + τ ¯ L ( x ) ω ¯ L 2 ( x )   .
  • (v) Finally, for all h = 1 , . . . , K  
    ¯ f ¯ h , L < Γ L γ 2 M + 1 . (97)
So far we have not defined the functions X h , L   on Λ ¯ ( q L )   for h = 1 , . . . , K   .
Set X h , L ( x ) = X ¯ h , L ( x )   if x Λ ¯ ( q L ) ,   h = 1 , . . . , K   ; also set
f h , L = f h , L 1 χ Ψ L + f ¯ h , L for h = 1 , . . . , K . (98)
Recall from  78 that ¯ f h , L 1 ¯ f h , L 1   for h = 1 , . . . , K .   Using  97 and that f h , L 1   is periodic by τ L 1   and Ψ L   consists of blocks of length τ L 1   ¯ f h , L λ ¯ ( Ψ L ) ¯ f h , L 1 + Γ L ( γ λ ¯ ( Λ ¯ ( q L ) ) ) 2 M + 1 λ ¯ ( Λ ¯ ( q L ) ) = ( * ) .   We can assume that κ L   and p 1 , L   are chosen so large that, taking into consideration  60 ,  80 and  81  ( ¯ f h , L 1 ) λ ¯ ( Ψ L ) λ ¯ ( R \ Λ ¯ ( q L ) ) < Γ L 1 C γ 2 M + 1 Γ L C γ 2 M + 1   holds as well. Hence using  54 we can continue our estimation by ( * ) < ( ¯ f h , L 1 ) λ ¯ ( Ψ L ) λ ¯ ( R \ Λ ¯ ( q L ) ) λ ¯ ( R \ Λ ¯ ( q L ) ) + Γ L C γ 2 M + 1 λ ¯ ( Λ ¯ ( q L ) ) <   Γ L C γ 2 M + 1 .     In case K = 0   after skipping a few of the preceding paragraphs one should continue reading the proof from here, again keeping in mind that for K = 0   there are no h   's satisfying h = 1 , . . . , K   and hence many expressions are vacuous and not needed for this case.
Set P L = P P L + 1 . . . P L P ¯ L P L 1   . We also put E L = E δ L E L E L E L   , and τ L = q L τ ¯ L τ L 1   . Then for all p P L P ¯ L   we have ( τ L , p ) = 1   . Assume x R \ ( Λ ¯ ( q L ) E L ) .   Then x Φ ~ L Φ L   and the old estimates work. In other words, for x R \ ( Λ ¯ ( q L ) E L ) Φ ~ L ,   set α L ( x ) = α L 1 ( x ) ,   ω L ( x ) = ω L 1 ( x ) ,   τ L ( x ) = τ L 1 ( x ) = τ L 1 ( x )   . Then ω L 2 ( x ) < τ L 1 < τ L   and by  76 we have ω L 1 ( x ) α L 1 ( x ) = ω L ( x ) α L ( x ) > Ω τ L 1 ( x ) = Ω τ L ( x ) .   Furthermore, if α L ( x ) n < n + m ω L ( x )   and τ L ( x ) | m   then, for h = 1 , . . . , K   letting f h , L , x = f h , L 1 , x χ Ψ L f h , L   by  77 and  82  1 m k = n n + m 1 f h , L 1 , x ( x + k 2 ) = 1 m k = n n + m 1 f h , L , x ( x + k 2 ) > X h , L ( x ) = X h , L 1 ( x ) .   Also observe that if x R \ ( Λ ¯ ( q L ) E L ) Φ ~ L Φ L   , then from α L ( x ) n k < n + m ω L ( x )   , and ω L 2 ( x ) < τ L 1   it follows that x + k 2 Ψ L   and hence by  95 , f K + 1 , L ( x + k 2 ) = f K + 1 , L 1 ( x + k 2 ) = f K + 1 , L , x ( x + k 2 ) = f K + 1 , L 1 , x ( x + k 2 )   and 1 m k = n n + m 1 f K + 1 , L 1 , x ( x + k 2 ) = 1 m k = n n + m 1 f K + 1 , L , x ( x + k 2 ) >   X K + 1 , L ( x ) = X K + 1 , L 1 ( x ) .   Finally, for all x R \ ( Λ ¯ ( q L ) E L ) Φ ~ L   , h = 1 , . . . , K + 1   , if α L 2 ( x ) j < j + τ L ( x ) ω L 2 ( x ) < τ L 1   , then f h , L 1 , x ( x + j + τ L 1 ( x ) ) = f h , L , x ( x + j + τ L ( x ) ) = f h , L , x ( x + j ) = f h , L 1 , x ( x + j ) .   Note that for h = K + 1   one needs to use again that if 0 j < ω L 2 ( x ) < τ L 1 ,   then x + j Ψ L   and f K + 1 , L ( x + j ) = f K + 1 , L 1 ( x + j ) .   Assume x Λ ¯ ( q L ) \ E L Λ ¯ ( q L ) \ E δ L   .
In case K = 0   set again α L ( x ) = α L 1 ( x ) ,   ω L ( x ) = ω L 1 ( x ) ,   τ L ( x ) = τ L 1 ( x ) = τ L 1 ( x )   and skip the rest of this subsection.
Now we turn to the case when K > 0 .   Since x Λ ¯ ( q L ) \ E L Λ ¯ ( q L ) \ E δ L   for h = 1 , . . . , K   , the estimates which we have for the K M   family put on Λ ¯ ( q L )   can be applied. In other words, for these x   set ω L ( x ) = d e f ω ¯ L ( x ) > α L ( x ) = d e f α ¯ L ( x ) ,   τ L ( x ) = d e f τ ¯ L ( x ) q L τ L 1 < τ L   . Then ω L 2 ( x ) < τ L   , and ω L ( x ) α L ( x ) > Ω L τ ¯ L ( x ) = Ω τ L ( x ) .   Furthermore, if α L ( x ) n < n + m ω L ( x )   and τ L ( x ) | m   , then τ ¯ L ( x ) | m   and by  96 and  98 if we let f h , L , x = f ¯ h , L , x f ¯ h , L f h , L   , we have for h = 1 , . . . , K   1 m k = n n + m 1 f h , L ( x + k 2 ) 1 m k = n n + m 1 f h , L , x ( x + k 2 ) > X h , L ( x ) .   For all p P L P ¯ L   we have ( τ ¯ L ( x ) q L τ L 1 , p ) = ( τ L ( x ) , p ) = 1   and for h = 1 , . . . , K   , if α L 2 ( x ) j < j + τ L ( x ) ω L 2 ( x )   then α L 2 ( x ) = α ¯ L 2 ( x ) j < j + τ ¯ L ( x ) < . . . < j + q L τ ¯ L ( x ) ω L 2 ( x ) = ω ¯ L 2 ( x )   and hence f h , L , x ( x + j + τ L ( x ) ) = f ¯ h , L , x ( x + j + τ L ( x ) ) = f ¯ h , L , x ( x + j + q L τ L 1 τ ¯ L ( x ) ) = f ¯ h , L , x ( x + j + ( q L τ L 1 1 ) τ ¯ L ( x ) ) = . . . = f ¯ h , L , x ( x + j ) = f h , L , x ( x + j ) .  

4.2.7 Properties of f K + 1 , L  

We need to check  41 when h = K + 1   and x Λ ¯ ( q L ) \ E L ( S L , L \ S L , L 1 ) \ E L ,   and τ L ( x ) = τ L 1 q L τ ¯ L ( x ) | m   . If we can show  41 holds when m = τ L 1 q L   then this clearly implies that it holds when τ L ( x ) | m   . Recall that Ψ ^ L   is periodic by q L .   Since τ L 1 P L 1   , q L P L   implies ( τ L 1 , q L ) = 1   , k + j q L   covers all residues modulo τ L 1   as j   runs from 0   to τ L 1 1 .   Since f K + 1 , L 1 , x = f K + 1 , L 1   is periodic by τ L 1   , using  73 we obtain
1 τ L 1 j = 0 τ L 1 1 f K + 1 , L 1 , x ( x + ( k + j q L ) 2 ) > ( 1 ρ 2 ) λ ¯ ( F L 1 ) . (99)
Also observe that from the periodicity of Ψ ^ L   by q L   it follows that if x + k 2 Ψ ^ L   then x + ( k + j q L ) 2 Ψ ^ L Ψ L   as well. Hence from x + k 2 Ψ ^ L   it follows that f K + 1 , L , x ( x + ( k + j q L ) 2 ) = f K + 1 , L 1 , x ( x + ( k + j q L ) 2 ) .   Therefore, 1 τ L 1 q L k = n n + τ L 1 q L 1 f K + 1 , L , x ( x + k 2 ) =   1 τ L 1 q L k = n n + q L 1 j = 0 τ L 1 1 f K + 1 , L , x ( x + ( k + j q L ) 2 )   1 τ L 1 q L k = n x + k 2 Ψ ^ L n + q L 1 j = 0 τ L 1 1 f K + 1 , L , x ( x + ( k + j q L ) 2 ) =   1 q L k = n x + k 2 Ψ ^ L n + q L 1 1 τ L 1 j = 0 τ L 1 1 f K + 1 , L 1 , x ( x + ( k + j q L ) 2 ) >   (using  99 ) 1 q L k = n x + k 2 Ψ ^ L n + q L 1 ( 1 ρ 2 ) λ ¯ ( F L 1 )   (using  79 ) 1 q L ( 1 ρ 2 ) λ ¯ ( F L 1 ) # { k [ 0 , q L ) Z : x + k 2 Λ ¯ ( q L ) }   1 q L ( 1 ρ 2 ) λ ¯ ( F L 1 ) # { k [ 0 , q L ) Z : x + k 2 Λ ¯ ( q L ) } =   ( 1 ρ 2 ) λ ¯ ( F L 1 ) 1 q L # { k [ 0 , q L ) Z : x + k 2 Λ ( q L ) } .   Now use the estimates  93 through  94 and obtain that for x E L   1 q L # { k [ 0 , q L ) Z : x + k 2 Λ ( q L ) } ( 1 2 ρ ~ ) ( 1 ρ ~ ) ( 1 γ ) .   Thus, if x ( S L , L \ S L , L 1 ) \ E L   we have for a suitable choice of ρ ~   1 τ L 1 q L k = n n + τ L 1 q L 1 f K + 1 , L , x ( x + k 2 ) >   ( 1 ρ 2 ) λ ¯ ( F L 1 ) ( 1 2 ρ ~ ) ( 1 ρ ~ ) ( 1 γ )   (Using  84 and  86 and choosing a sufficiently small ρ ~ > 0   we have) ( 1 ρ ) ( 1 γ ) λ ¯ ( F L 1 ) > ( 1 ρ ) C ~ γ λ ¯ ( F L ) = X K + 1 , L ( x ) .  

4.2.8 Finishing the leakage

We keep repeating the leakage steps until for the first time for an L   we have λ ¯ ( F L ) < 2 M   . By  56 and  85 we have L L   and by γ < γ 0 < 10 6   we have L 2 .   We set f h = f h , L   for h = 1 , . . . , K + 1 ,   and X h = X h , L   for h = 1 , . . . , K .   From the induction steps we have E δ = d e f E L   such that λ ¯ ( E δ ) < ( L + 1 ) ( L + 1 ) δ δ .   There exists τ = d e f τ L   such that f h   , h = 1 , . . . , K + 1   , X h   , h = 1 , . . . , K   and X K + 1 , L   are periodic by τ ,   X h   , h = 1 , . . . , K   and X K + 1 , L   are pairwise independent X h   , h = 1 , . . . , K   are M     0.99   -distributed. By using the distributional properties of X K + 1 , L   we will define X K + 1   at the end of this section.
For all x E δ   there exist ω ( x ) = ω L ( x ) > α ( x ) = α L ( x ) > A ,   τ ( x ) = τ L ( x ) < τ   such that ω 2 ( x ) < τ ,   ω ( x ) α ( x ) > Ω τ ( x )   . Moreover, if α ( x ) n < n + m ω ( x )   and τ ( x ) | m   , then for all h = 1 , . . . , K   letting f h , x = f h , L , x f h , L = f h   (see also  59 )
1 m k = n n + m 1 f h ( x + k 2 ) 1 m k = n n + m 1 f h , x ( x + k 2 ) > X h ( x ) , (100)
and setting f K + 1 , x = f K + 1 , L , x = f K + 1 , L = f K + 1   , (see also  95 )
1 m k = n n + m 1 f K + 1 ( x + k 2 ) = 1 m k = n n + m 1 f K + 1 , x ( x + k 2 ) > X K + 1 , L ( x ) , (101)
for all p P L P   , ( τ ( x ) , p ) = 1 ,   ( τ , p ) = 1 ,   for all x E δ   , for all h { 1 , . . . , K + 1 }   , f h , x ( x + j + τ ( x ) ) = f h , x ( x + j )   whenever α 2 ( x ) j < j + τ ( x ) ω 2 ( x ) .   Finally, for h = 1 , . . . , K   ¯ f h < C γ Γ L 2 M + 1 < Γ 2 M + 1 ,   and ¯ f K + 1 = λ ¯ ( F L ) < 2 M + 1 < Γ 2 M + 1 .   We need to replace X K + 1 , L   by a suitably chosen X K + 1   which is M     0.99   -distributed, pairwise independent from X h   when h = 1 , . . . , K   and  100 holds with h = K + 1   as well; in fact, this is the easiest part since by choosing X K + 1   so that X K + 1 X K + 1 , L   then  101 yields  100 .
Since L   is the first index when λ ¯ ( F L ) < 2 M   we have λ ¯ ( F L 1 ) 2 M   which by  85 implies
λ ¯ ( F L ) > ( 1 2 γ ) 2 M . (102)
What is the distribution of X K + 1 , L   ? Recall F L = { x : f K + 1 ( x ) = 1 }   , 1 2 γ < r L = λ ¯ ( F L ) / λ ¯ ( F L 1 ) < 1 γ 2 ,   for L = 1 , . . . , L ,   and λ ¯ ( F L ) = r 0 r L = r 1 r L   . By  90 
1 1 ρ 2 M > 1 1 ρ λ ¯ ( F L ) > λ ¯ ( S L , 0 ) > ( 1 ρ ) λ ¯ ( F L ) > ( 1 3 γ ) 2 M , (103)
where the last inequality holds if ρ > 0   is so small that ( 1 ρ ) ( 1 2 γ ) > ( 1 3 γ ) .   Recall that 1 > C ~ γ > 1 10 6   and we can choose ρ > 0   so that we can assume that
0.999 < C ~ γ ( 1 ρ ) < 1.001 . (104)
By  83 , X K + 1 , L ( x ) = ( 1 ρ ) C ~ γ 1 = ( 1 ρ ) C ~ γ λ ¯ ( F 0 )   if x S L , 0 .   By  83 and  86 if x S L , l \ S L , l 1   then for l = 1 , . . . , L   ,
X K + 1 , L ( x ) = ( 1 ρ ) r 0 r l C ~ γ = ( 1 ρ ) λ ¯ ( F l ) C ~ γ . (105)
This and  104 imply that for x S L , L \ S L , L 1  
X K + 1 , L ( x ) = ( 1 ρ ) C ~ γ λ ¯ ( F L ) < 2 M ( 1 ρ ) C ~ γ < 0.999 2 M + 1 . (106)
Using  91 we have the following measure estimate:
1 ( 1 ρ ) r 0 r l λ ¯ ( S L , 0 ) > λ ¯ ( S L , l ) > ( 1 ρ ) 1 r 0 r l λ ¯ ( S L , 0 ) ,   which is equivalent to
1 1 ρ λ ¯ ( S L , 0 ) > λ ¯ ( F l ) λ ¯ ( S L , l ) > ( 1 ρ ) λ ¯ ( S L , 0 ) . (107)
Suppose for l = 0 , . . . , M 1 ,   ( l )   is chosen so that
X K + 1 , L ( x ) 0.999 2 l when x S L , ( l ) , (108)
but X K + 1 , L ( x ) < 0.999 2 l   for some x S L , ( l ) + 1   , by  106 such an ( l ) L   exists. By  105  ( 1 ρ ) λ ¯ ( F ( l ) + 1 ) C ~ γ < 0.999 2 l ,   and ( 1 ρ ) λ ¯ ( F ( l ) ) C ~ γ 0.999 2 l   hold. Therefore, using λ ¯ ( F ( l ) + 1 ) / λ ¯ ( F ( l ) ) > ( 1 2 γ )   we infer
0.999 2 l ( 1 ρ ) λ ¯ ( F ( l ) ) C ~ γ < 0.999 1 2 γ 2 l . (109)
Set S L , ( 1 ) = .   By using  105 and the above definitions, estimates for l = 0 , . . . , M 1 ,   x S L , ( l ) \ S L , ( l 1 )   we have
0.999 2 l X K + 1 , L ( x ) < 0.999 2 ( l 1 ) . (110)
By  107  λ ¯ ( S L , ( l ) ) < 1 1 ρ λ ¯ ( S L , 0 ) 1 λ ¯ ( F ( l ) ) <   (using  103 and  109 ) 1 ( 1 ρ ) 2 λ ¯ ( F L ) ( 1 ρ ) C ~ γ 0.999 2 l < ( 1 ρ ) C ~ γ 2 l 0.999 ( 1 ρ ) 2 2 M ,   on the other hand, by using  107  λ ¯ ( S L , ( l ) ) > ( 1 ρ ) λ ¯ ( S L , 0 ) λ ¯ ( F ( l ) ) >   (using  103 and  109 again) ( 1 ρ ) 2 λ ¯ ( F L ) ( 1 ρ ) C ~ γ ( 1 2 γ ) 0.999 2 l >   (using  102 ) ( 1 ρ ) 2 ( 1 2 γ ) 2 2 M 2 l ( 1 ρ ) C ~ γ .   Thus for l = 0 , . . . , M 1  
λ ¯ ( S L , ( l ) \ S L , ( l 1 ) ) > (111)
( 1 ρ ) 2 ( 1 2 γ ) 2 2 M + l ( 1 ρ ) C ~ γ ( 1 ρ ) C ~ γ 0.999 ( 1 ρ ) 2 2 M + l 1 > 0.99 2 M + l 1   if parameters are chosen properly, that is, ρ   and ρ   are sufficiently close to 0   , and recalling that 0 < γ < γ 0 < 10 6   and 1 > C ~ γ > 1 10 6   . By  110 if l = 0 , . . . , M 1 ,   x S L , ( l ) \ S L , ( l 1 )   we have X K + 1 , L ( x ) 0.999 2 l .   By  105 , X K + 1 , L   takes different constant values on the set S L , 0   and on the sets S L , l \ S L , l 1   for l = 1 , . . . , L .   We also know that X K + 1 , L   is pairwise independent from X h   for h = 1 , . . . , K .   Hence any function which is constant on the sets S L , 0   , S L , l \ S L , l 1   , l = 1 , . . . , L   is still pairwise independent from X h   for h = 1 , . . . , K .   Set X K + 1 ( x ) = 0.99 2 l   if x S L , ( l ) \ S L , ( l 1 )   for l = 0 , . . . , M 1 .   Set S K + 1 ( x ) = 0   if x S L , ( M 1 ) .   Now X K + 1 X K + 1 , L   and it is still pairwise independent from X h   , h = 1 , . . . , K .   It takes its values in { 0 , 0.99 , . . . , 0.99 2 M + 1 }   but it is M     0.99   -“super” distributed, by this we mean that λ ¯ ( { x R : X K + 1 ( x ) = 0.99 2 l } ) =   λ ¯ ( S L , ( l ) \ S L , ( l 1 ) ) 0.99 2 M + ( l 1 )   holds for l = 0 , . . . , M 1 .   Since our measure space is nonatomic one can choose an M     0.99   -distributed X K + 1 X K + 1   so that it is still pairwise independent from X h   for h = 1 , . . . , K .  

5 Proof of the Main Result

Lemma  4 yields the next theorem which as we will see easily implies Theorem  1 .
Theorem 6. Given δ > 0   , M   and K   there exist τ 0 N ,   E ¯ δ [ 0 , 1 ) ,   a measurable transformation T : [ 0 , 1 ) [ 0 , 1 )   , T ( x ) = x + 1 τ 0   modulo 1   , f : [ 0 , 1 ) [ 0 , + )   , X h ,   h = 1 , . . . , K   which are pairwise independent M     0.99   -distributed random variables defined on [ 0 , 1 )   equipped with the Lebesgue measure, λ   , such that λ ( E ¯ δ ) < δ   , for all x [ 0 , 1 ) \ E ¯ δ   there exists N x   satisfying 1 N x k = 1 N x f ( T k 2 ( x ) ) > h = 1 K X ¯ h ( x ) ,   and [ 0 , 1 ) f d λ < K 2 M + 2 .  
  • Proof. Use Lemma  4 with δ   , Ω = 1000 ,   Γ = 1.1   , A = 1 ,   P =   to obtain a K M   family with E δ   , f h   and X h   periodic by τ = τ 0 .   Set E ¯ δ = 1 τ 0 E δ [ 0 , 1 )   and for x [ 0 , 1 )   set f ¯ h ( x ) = f h ( τ 0 x ) ,   X ¯ h ( x ) = X h ( τ 0 x )   .
    Assume x [ 0 , 1 ) \ E ¯ δ   . Since Ω α ( τ 0 x ) τ ( τ 0 x ) < ω ( τ 0 x )   we have α ( τ 0 x ) = n < n + ( Ω 1 ) α ( τ 0 x ) τ ( τ 0 x ) < ω ( τ 0 x )   and 1 ( Ω 1 ) α ( τ 0 x ) τ ( τ 0 x ) k = α ( τ 0 x ) α ( τ 0 x ) + ( Ω 1 ) α ( τ 0 x ) τ ( τ 0 x ) 1 f h ( τ 0 T k 2 x ) =   1 ( Ω 1 ) α ( τ 0 x ) τ ( τ 0 x ) k = α ( τ 0 x ) α ( τ 0 x ) + ( Ω 1 ) α ( τ 0 x ) τ ( τ 0 x ) 1 f h ( τ 0 x + k 2 ) > X h ( τ 0 x ) .   Since f h 0   , if we let N x = α ( τ 0 x ) + ( Ω 1 ) α ( τ 0 x ) τ ( τ 0 x ) 1   , then for all h = 1 , . . . , K   1.01 N x k = 1 N x f ¯ h ( T k 2 ( x ) ) = 1.01 N x k = 1 N x f h ( τ 0 T k 2 ( x ) ) X ¯ h ( x ) .   Let f ( x )   be the restriction of h = 1 K 1.01 f ¯ h ( x )   onto [ 0 , 1 ) .   Then 0 1 f ( x ) d λ ( x ) = 1.01 h = 1 K ¯ f h < 1.01 Γ K 2 M + 1 < K 2 M + 2 .   For all x [ 0 , 1 ) \ E ¯ δ   there exists N x   such that 1 N x k = 1 N x f ( T k 2 x ) > h = 1 K X ¯ h ( x ) .  
Now we can complete the proof of Theorem  1 .
  • Proof. For each p N   set M p = 4 p .   On the probability space ( [ 0 , 1 ) , λ )   consider M p 0.99   -distributed random variables X ¯ h   for h = 1 , . . . , K   for a sufficiently large K   . Assume that u   denotes the mean of these variables. An easy calculation shows that u = [ 0 , 1 ] X ¯ h ( x ) d λ ( x ) = l = 0 M p 1 0.99 2 2 l 2 M p + l 1 > 0.9 M p 2 M p 1 .   By the weak law of large numbers λ { x : | 1 K h = 1 K X ¯ h ( x ) u | u 2 } 0 .   Fix K   so large that λ { x : 1 K h = 1 K X ¯ h ( x ) u 2 } > 1 1 p ,   and let U p = { x : 1 K h = 1 K X ¯ h ( x ) > 0.9 2 M p 2 M p 1 } .   We have λ ( U p ) > 1 1 p .   By Theorem  6 used with δ = 1 p ,   M p   and K   there exist τ 0 N ,   E ¯ 1 / p [ 0 , 1 )   and a periodic transformation T : [ 0 , 1 ) [ 0 , 1 ) ,   T ( x ) = x + 1 τ 0   modulo 1 ,   f : [ 0 , 1 ) [ 0 , + )   , X ¯ h   pairwise independent M p 0.99   -distributed random variables defined on [ 0 , 1 )   such that λ ( E ¯ 1 / p ) < 1 p   and for all x [ 0 , 1 ) \ E ¯ 1 / p   there exists N x   such that 1 N x k = 1 N x f ( T k 2 x ) > h = 1 K X ¯ h ( x )   and [ 0 , 1 ) f d λ < K 2 M p + 2 .   Put U p = U p \ E ¯ 1 / p .   Then λ ( U p ) > 1 2 p   and for x U p   there exists N x   such that 1 N x k = 1 N x f ( T k 2 x ) > h = 1 K X ¯ h ( x ) > K 0.9 2 M p 2 M p 1 .   Thus letting t = K 0.9 2 M p 2 M p 1   , and U ~ p = { x : sup N 1 N k = 1 N f ( T k 2 x ) > t }   we have U p U ~ p   and hence λ ( U ~ p ) > 1 2 p .   On the other hand | f | d λ t < K 2 M p + 2 K 0.9 2 M p 2 M p 1 < 32 M p .   Hence, λ ( U ~ p ) 1   and | f | d λ / t 0   as p .   Therefore there is no C   for which  2 holds with μ = λ   . This implies that the sequence n k = k 2   is L 1   -universally bad.
References

  1. I. Assani, Z. Buczolich and R. D. Mauldin “An L 1   Counting Problem in Ergodic Theory”, to appear in J. Anal. Math.
  2. I. Assani, Z. Buczolich and R. D. Mauldin “Counting and convergence in Ergodic Theory”, Acta Univ. Carolinae. 45 (2004), 5–21.
  3. J. Bourgain, “Pointwise ergodic theorems for arithmetic sets”, With an appendix by the author, Harry Fürstenberg, Yitzhak Katznelson and Donald S. Ornstein, Inst. Hautes Études Sci. Publ. Math. No. 69 (1989), 5–45.
  4. J. Bourgain, “An approach to pointwise ergodic theorems”, Geometric aspects of functional analysis (1986/87), 204–223, Lecture Notes in Math., 1317, Springer, Berlin, 1988.
  5. J. Bourgain, “On the pointwise ergodic theorem on L p   for arithmetic sets”, Israel J. Math. 61 (1988), no. 1, 73–84.
  6. J. Bourgain, “On the maximal ergodic theorem for certain subsets of the integers”, Israel J. Math. 61 (1988), no. 1, 39–72.
  7. J. Bourgain, “Almost sure convergence in ergodic theory”, Almost everywhere convergence. Proceedings of the International Conference on Almost Everywhere Convergence in Probability and Ergodic Theory held in Columbus, Ohio, June 11–14, 1988. Edited by Gerald A. Edgar and Louis Sucheston. Academic Press, Inc., Boston, MA, (1989).
  8. J. P. Conze, “Convergence des moyennes ergodiques pour des sous suites”, Bull. Soc. Math. France, 35 (1973), 7-15.
  9. A. Garsia, Topics in Almost Everywhere Convergence, Chicago, Markham Publ. Co. 1970.
  10. G. H. Hardy and E. M. Wright An introduction to the Theory of Numbers, Fifth edition, Oxford Science Publications, 1979.
  11. P. Kurlberg and Z. Rudnick, “The distribution of spacings between quadratic residues”, Duke Math. J. 100 (1999), no. 2, 211-242.
  12. P. Kurlberg, “The distribution of spacings between quadratic residues II”, Israel J. Math. 120 (2000), part A, 205-224.
  13. J. Lamperti, Probability: A survey of the Mathematical Theory, W. A. Benjamin Inc., New York (1966).
  14. I. Niven and H. S. Zuckerman An Introduction to the Theory of Numbers,
  15. R. Peralta, “On the distribution of quadratic residues and nonresidues modulo a prime number”, Math. Comp. 58 (1992), no. 197, 433-440.
  16. J. Rosenblatt and M. Wierdl “Pointwise ergodic theorems via harmonic analysis”, Ergodic theory and its connections with harmonic analysis (Alexandria, 1993), 3–151, London Math. Soc. Lecture Note Ser., 205, Cambridge Univ. Press, Cambridge, 1995.
  17. S. Sawyer, “Maximal inequalities of weak type”, Ann. of Math. 84 (1966) no. 4, 157-174.
  18. E. M. Stein, “On limits of sequences of operators”, Ann. of Math. 74 (1961) no. 4, 140-170.