This is a preprint of: “Subseries and signed series”, Armengol Gasull, Francesc Mañosas, Commun. Pure Appl. Anal., vol. 18(1), 479–492, 2019. DOI: [10.3934/cpaa.2019024] Subseries and signed series Armengol Gasull and Francesc Mañosas Departament de Matemàtiques Universitat Autònoma de Barcelona, Bellaterra, Barcelona, Spain gasull@mat.uab.cat, manyosas@mat.uab.cat P Abstract. For any Ppositive decreasing P to zero sequence an such that an diverges we consider the related series kn an and jn an . Here, kn and jn are real sequences such that kn ∈ {0, 1} and jn ∈ {−1, 1}. We study their convergence and characterize P it in terms of the density of 1’s in the sequences kn and jn . We extend our results to series mn an , with mn ∈ {−1, 0, 1} and apply them to study some associated random series. 2000 MSC: Primary: 40A05. Secondary: 60G50, 65B10, 97I30 Keywords: Harmonic series, divergent series, subsums, signed sums, random series 1 Introduction and main results P Given a divergentP series an , with an > 0, decreasing and with P limit zero, we study properties of its subsums, kn an , where kn ∈ {0, 1} and of its signed sums, jn an , where jn ∈ {−1, 1}. As we willPsee, both questions are related, and moreover can be treated simultaneously studying the series mn an , with mn ∈ {−1, 0, 1}. For a sequence of real numbers cn we will say that the sequence fn , given by the quotient between the number of A’s in the list c1 , c2 , . . . , cn and n, is the sequence of densities of A’s associated to cn . If lim fn = f ∈ [0, 1] exists we will say that f is the density of A’s of the sequence cn . We characterize the convergence of the series in terms of properties of the sequences of densities of 1’s in kn and jn . As usual, when lim an /bn = 1 we will write an ∼ bn . We split our main results in Theorems A and B, the first one concerning with subsums and the second one with signed sums. As we will see in Theorem C, some points can be treated together. A key tool in many of our proofs will be a restricted version of the celebrated Toeplitz Theorem about the summability of weighted sequences, see for instance [6]. For completeness, in Section 2 we present a simple proof in the restrictive case of non-negative weights. P Theorem A. Let an be a positive monotonous sequence such P that lim an = 0, an = ∞ and set Pn n i=1 ki Un = i=1 ai . Let kn be P a sequence with kn ∈ {0, 1}, fn = n be the associate sequence of densities of 1’s and Sn = ni=1 ki ai be its associated sequence of partial sums. Then the following assertions hold: (a) If Sn converges then lim nan fn = 0. In particular P lim fn = 0 when lim inf nan > 0. Moreover if lim nan fn = 0 then Sn converges if and only if ni=1 i(ai − ai+1 )fi converges. 1 http://www.gsd.uab.cat (b) lim inf fn ≤ lim inf USnn ≤ lim sup USnn ≤ lim sup fn . Hence, if Sn converges then lim inf fn = 0, but there are cases where lim fn does not exist. Additionally, if lim inf fn > r > 0 then Sn > rUn for n large enough. Moreover, lim USnn = r when lim fn = r, and if r 6= 0, then Sn ∼ rUn . Pn (c) For any l ≥ 0 there exists a sequence kn ∈ {0, 1} such that lim i=1 ki ai = l. (d) Let rn be a monotonous sequence with lim rn = ∞ and lim Urnn = 0. Assume also that lim rn −r an n−1 = 0. Then there exists a sequence kn ∈ {0, 1} such that the associate sequence of partial sums Sn satisfies Sn ∼ rn and lim inf fn = 0. Observe that items (a) and (b) give two different necessary conditions for the convergence of a subseries in terms of the corresponding density. The first one is that lim nan fn = 0. The second one is that lim inf fn = 0. Notice that, on the one hand, when lim inf nan > 0, the first one implies lim fn = 0. This is precisely the situation for the harmonic series, see for instance [10, 13, 14, 17, 18]. However, when lim nan = 0 this condition is automatically satisfied because 0 ≤ fn ≤ 1, and imposes no restrictions on fn . On the other hand, when lim nan = ∞ this first condition is stronger. It implies that lim fn goes to zero faster than na1n . P kn Moreover, in the harmonic case, it is also known that if n is convergent and lim fn ln n = C ∈ R, then C = 0, see [16]. This fact is also a consequence of the second part of P itemC (a) C because in this situation, and when C 6= 0, n(an − an+1 )fn ∼ (n+1) ln n and the series (n+1) ln n is divergent. In particular, this result can be applied to show the divergence of the sum of the inverses of the prime numbers by using the results of Hadamard and de la Vallée-Poussin. Recall that they proved independently in 1896 that the density of the prime numbers smaller than n is asymptotic to ln1n . In fact, using the same approach we will prove the following corollary. P 1 Corollary 1.1. The series p>2, prime p(ln p)α (ln ln p)β , α ≥ 0, β ≥ 0, is convergent if and only if either α > 0 or α = 0 and β > 1. The above result when β = 0 is already proved in [20] by using a different approach. If instead of taking the prime numbers we consider the sum of the inverses of the twin primes it is known that the corresponding fn satisfies |fn | < lnC2 n , for some positive constant C, see [1, p. 313]. Hence, by using again the second part of item (a) we recover the nice result of Brun [4], who proved in 1919 the convergence of that series, because in this case, |n(an − an+1 )fn | ≤ (n+1)C ln2 n P C and the series (n+1) ln2 n is convergent. The result of item (c) is already known, see [2, 19, 21]. Notice also that by Stolz’s criterion, if lim rn −r an n−1 = 0, then lim Urnn = 0. Therefore, item (d) implies that, essentially, subsums of the original series with lim inf fn = 0 can diverge with any speed smaller than the speed of divergence of the complete series. A celebrated P concrete example for an = n1 and rn = ln ln n, is the result of 1874 of Mertens who proved that p prime, p≤n p1 ∼ ln ln n, see [9, 11, 15]. The most famous convergent, but not absolutely convergent series, was given by Mercator in P (−1)n+1 the XVII century and is n = ln 2. Taking jn = (−1)n+1 , it holds that the density of 1’s in 1 the sequence jn is 2 . Next theorem shows that in many convergent cases this will be the situation. 2 P Theorem B. Let an be a positive monotonous sequence such that lim an = 0, an = ∞ and Pn 1 Pn (1+ji ) P with jn ∈ {−1, 1}, fn = n i=1 2 be its associate set Un = i=1 ai . Let jn be a sequence sequence of densities of 1’s and Tn = ni=1 ji ai be the associated sequence of partial sums. Then the following assertions hold: 1 (i) If Tn converges then lim nan (2fn − 1) = 0. In particular lim fn = Pn2 when lim inf nan > 0. Moreover, if lim nan (2fn − 1) = 0, Tn converges if and only if i=1 i(ai − ai+1 )(2fi − 1) converges. (ii) lim inf(2fn − 1) ≤ lim inf UTnn ≤ lim sup UTnn ≤ lim sup(2fn − 1). Hence, if Tn converges then 1 2 ∈ [lim inf fn , lim sup fn ], but there are cases where lim fn does not exist. Additionally, if lim inf fn > r > 21 (resp. lim sup fn < s < 12 ) then Tn > (2r − 1)Un (resp. Tn < (2s − 1)Un ) for n large enough. Moreover, if lim fn = r then lim UTnn = 2r − 1 and, in particular, when r 6= 12 , Tn ∼ (2r − 1)Un . P (iii) For any l ∈ R there exists a sequence jn ∈ {−1, 1} such that lim ni=1 ji ai = l. (iv) Let rn be a monotonous sequence with lim rn = ∞ and lim Urnn = 0. Assume also that lim rna−rn−1 n+1 = 0. Then there exists a sequence jn ∈ {−1, 1} such that the associate sequence of partial sums Tn satisfies Tn ∼ rn and 12 ∈ [lim inf fn , lim sup fn ] rn −rn−1 rn −rn−1 Notice that 0 < an < an+1 . Hence, as in Theorem A, by Stolz criterion the hypothesis rn −rn−1 lim an+1 = 0 implies that lim Urnn = 0. As we will see, the proofs of the first two itemsP of the above two theorems will be a consequence of the following more general result about series mn an , with mn ∈ {−1, 0, 1}. P Theorem C. P Let an be a positive monotonous sequence sequence such that lim an = 0, an = ∞ and set Un = ni=1 ai . Let mn be a sequence with mn ∈ {−1, 0, 1}, such that fP n and gn are the n associated sequences of densities of 1’s and −1’s, respectively, and let Pn = i=1 mi ai be its associated sequence of partial sums. Then the following assertions hold: (a) If Pn converges then lim nan (fn −gn ) = 0. In particular lim(fn −gn ) P = 0 when lim inf nan > 0. Moreover if lim nan (fn − gn ) = 0 then Pn converges if and only if ni=1 i(ai − ai+1 )(fi − gi ) converges. Pn Pn (b) lim inf(fn − gn ) ≤ lim inf U n ≤ lim sup U n ≤ lim sup(fn − gn ). Hence, if Pn converges then lim inf(fn − gn ) = 0, but there are cases where lim(fn − gn ) does not exist. Additionally, if lim inf(fn − gn ) > r > 0 (resp. lim sup(fn − gn ) < s < 0) then Pn > rUn (resp. Pn < sUn ) Pn for n large enough. Moreover, lim U n = r when lim(fn − gn ) = r, and in particular, if r 6= 0, then Pn ∼ rUn . In the above theorem, two items more, similar to the last two items of Theorems A and B could be added. We have decided to omit them because the statements of these theorems are stronger. For instance they allow to obtain any finite sum without using −1’s (Theorem A). Theorems A, B and C can be extended, without major difficulties, to positive divergent series with non increasing terms going to zero, but they are no more true for general positive sequences 3 an going to zero. Under these assumptions it is possible to have a convergent subseries with density f arbitrarily close to one. For instance we can split the integers in the set of squares S := [12 , 22 , 32 , 42 , . . .] and the complementary one, N \ S = [2, 3, 5, 6, 7, 8, 10, . . .]. Then, for any fixed m ∈ N, construct an taking the inverses of the first m elements of S and the inverse of Pthe first element in N \ S, and continue similarly with the remaining elements. In this way, an is P divergent and the subseries of the inverses of the squares is convergent. Hence, writing it as kn an , with kn = 1 when 1/an is a square, and kn = 0 otherwise, we get that for this series is m convergent and the density of 1’s is f = m+1 . Similarly, a convergent series with kn with density f = 1 can be constructed. Consider a discrete random variable W, with the following distribution: P {W = 1} = p, P {W = −1} = q and P {W = 0} = 1 − p − q, with p + q > 0. For short we will denote this distribution by W(p, q). P The convergence of the random series an Wn , where Wn are independent identically distri- buted (i.i.d.) random variables, with distribution W(p, q), can be studied with the celebrated Kolmogorov’s Three-Series Theorem, see Theorem 2.8 or [3, 12]. In Section 4 we will prove next theorem by using it. That section also includes a discussion of how, in some particular cases, this result can be reobtained as a consequence of Theorem C and of the Law of the Iterated Logarithm. P Theorem D. Consider the random series Z = an Wn , where Wn is a sequence of i.i.d. random P with distribution W(p, q). Assume that an is a positive P variables, sequence, that tends to 0 and such that an = ∞. Then Z converges a.s. if and only if p = q and a2n is convergent. Otherwise, Z is a.s. divergent. 2 Preliminary results In the first part of this section we collect several results about series. In the second one we recall some results about random variables and random series. One of the main tools that we will use is the so called Toeplitz Theorem ([6, Sec. 3.1-3.6], that we state and prove here with more restrictive assumptions appropriate for our interests. Theorem 2.1. Let cn,m , (n, m) ∈ N × N be a double sequence satisfying the following properties: (a) cn,m ≥ 0 for all (n, m) ∈ N × N and cn,m = 0 when m > n. P (b) lim ni=1 cn,i = 1. (c) For any fixed m ∈ N, lim cn,m = 0. Pn Then for any sequence xn we get that the sequence yn = i=1 cn,i xi satisfies lim inf xn ≤ lim inf yn ≤ lim sup yn ≤ lim sup xn . In particular if lim xn = l ∈ R ∪ {±∞} then lim yn = l. Proof. Let us denote a := lim inf xn and b := lim sup xn and let z be an accumulation point of yn . We will assume that a and b are finite. The other cases follow by obvious adaptations of the 4 proof. To prove the theorem we need to show that z ∈ [a, b]. To do this we will show that for any  > 0, z ∈ [a − , b + ]. Note first that if xn ∈ [A, B] for all n ∈ N, then since cn,i ≥ 0 we get n n  X  X   yn ∈ cn,i A, cn,i B i=1 i=1 P for all n ∈ N. Therefore, since lim ni=1 cn,i = 1, any accumulation point of yn belongs to [A, B]. The second observation is that if we change a finite number of terms of the sequence xn , obtaining a new sequence x0n , then the set of accumulation points of the corresponding sequence yn0 does not change. This is due to the fact that if, given a fixed r, we change xr by x0r then the corresponding sequence yn0 satisfies yn0 = yn + cn,r (x0r − xr ) and since lim cn,r = 0, the sequences yn and yn0 share the same set of accumulation points. Let z be an accumulation point of yn and let  > 0. Then the sequence xn has only a finite number of terms outside [a − , b + ]. We construct another sequence x0n by changing the terms outside [a − , b + ] by a for example. Then from the second observation z is also an accumulation point of the sequence yn0 and by the first observation it follows that z ∈ [a − , b + ]. This ends the proof of the theorem. A consequence of the above result is the next known extension of the celebrated Stolz’s criterion that we state and prove in the next lemma. an Lemma 2.2. (Stolz’s criterion) Let bn be a sequence of real numbers with bn a monotonous sequence tending to ∞. Then an − an−1 an an an − an−1 lim inf ≤ lim inf ≤ lim sup ≤ lim sup bn − bn−1 bn bn bn − bn−1 an −an−1 an In particular, if the sequence bn −bn−1 converges to l ∈ R ∪ {±∞} the same holds for bn . Proof. It follows applying Theorem 2.1 to   b1 (a  , if i = 1,  bn b1 , if n = 1, 1 bi −bi−1 xn = an −an−1 with cn,i = , if 1 < i ≤ n, otherwise,  bn  bn −bn−1  0, if i > n, because yn = an /bn . Lemma 2.3. Let an be a non-vanishing sequence, let mn be a sequence with mnP ∈ {−1, 0, 1} and fn (resp. gn ) its associate sequence of densities of 1’s (resp. −1’s) and let Pn = ni=1 mi ai be the corresponding sequence of partial sums. Then X n−1 1 1  n−1 X (1) nan (fn −gn ) = Pn −an − Pi and Pn = nan (fn −gn )+ i(ai −ai+1 )(fi −gi ). ai+1 ai i=1 i=1 5 1 Pn Proof. We have m1 = Pa11 and for i > 1, mi = Pi −P a i−1 , fn = 2n i=1 mi (mi + 1) and gn = 1 Pn 1 Pn i 2n i=1 mi (mi − 1). Hence, fn − gn = n i=1 mi and, as a consequence, n ! n−1   1 X Pi − Pi−1 P1 Pn 1X 1 1 fn − gn = + = − − Pi n ai a1 nan n ai+1 ai i=2 i=1 P and the first assertion follows. Similarly, n(fn − gn ) = ni=1 mi and holds that m1 = f1 − g1 and for i > 1, mi = i(fi − gi ) − (i − 1)(fi−1 − gi−1 ). Hence n X n−1 X  Pn = i(fi − gi ) − (i − 1)(fi−1 − gi−1 ) ai + (f1 − g1 )a1 = nan (fn − gn ) + i(ai − ai+1 )(fi − gi ). i=2 i=1 The following result is well-known. We include its proof for completeness. Lemma 2.4. Let P f : [1, ∞)R n:−→ (0, ∞] be a continuous decreasing function. Then the sequence An = An (f ) = ni=1 f (i) − 1 f (s)ds is convergent. P Rn R n+1 Proof. Clearly ni=1 f (i) − 1 f (s)ds ≥ 0. Moreover An+1 − An = f (n + 1) − n f (s)ds ≤ 0. Thus An is a positive decreasing sequence. Therefore it is convergent. Pn 1  Recall that Euler, in 1731, proved that lim i=1 i − ln n = γ ∈ [0, 1), where γ ≈ 0.577218 is precisely the nowadays called Euler’s constant, see [7, 9]. Notice that if f0 (x) = 1/x then An (f0 ) precisely converges to the gamma constant, γ. Next lemma facilitates the application of the second part of item (a) of Theorem A. Lemma 2.5. Let an be a sequence of positive numbers given by a smooth function h : R+ → R+ , that is an = h(n), such that lim h0 (n + 1)/h0 (n) = 1. If for x big enough, h0 (x) < 0 and h00 (x) > 0, then an+1 − an ∼ h0 (n). Proof. By the Intermediate Value Theorem, an+1 − an = h(n + 1) − h(n) = h0 (zn ), where zn ∈ (n, n + 1). Since h0 is increasing h0 (n) < h(n + 1) − h(n) < h0 (n + 1). Hence, h0 (n + 1) h(n + 1) − h(n) 0 < < 1. h (n) h0 (n) Taking limit in both sides, by the hypotheses, the lemma follows. 2.1 Random series Some of the results of this section are extracted from [3, 8]. We start stating the Law of the Iterated Logarithm, that quantifies the speed of convergence towards the expected value given by the Strong Law of Large Numbers. Theorem 2.6. Let Xn be a sequence of i.i.d. random variables with E(X12 ) < ∞. Then, Pn Pn i=1 Xi − nµ √ i=1 Xi − nµ (2) lim inf = −1 (a.s.) and lim sup √ = +1 (a.s.), σ 2n ln ln n σ 2n ln ln n where E(X1 ) = µ and Var(X1 ) = σ 2 . 6 Corollary 2.7. Let Wn be a sequence of i.i.d. with distribution W(p, q), and let Fn (resp. Gn ) be the random variables that give the density of 1’s (resp. −1’s) in the sequence. Then √  √  n Fn − Gn − (p − q) n Fn − Gn − (p − q) lim inf √ = −L (a.s.) and lim sup √ = L (a.s.), ln ln n ln ln n p where L = 2(p + q − (p − q)2 ) . Moreover, for almost all ω, there exists K(ω) > L such that r ln ln n Fn (ω) − Gn (ω) − (p − q) ≤ K(ω) . n Proof. Recall that the discrete random variable W(p, q), takes the valuesPn1, −1 and 0 with re- spective probabilities p, q and 1 − p − q and that p + q > 0. Notice that i=1 Wi = n(Fn − Gn ), E(Wi ) = µ = p − q and Var(Wi ) = σ 2 = p + q − (p − q)2 . Hence n X  Wi − nµ = n Fn − Gn − (p − q) . i=1 Since E(Wi2 ) = p + q > 0 we can apply Theorem 2.6. Replacing the above equality in (2) we get the results. The following result, known as Kolmogorov’s Three-Series Theorem, is the general tool for studying sums of independent random variables. Notice that it allows to know the behavior of a random series studying three deterministic series. As usual, 1B denotes the indicator function of the set B, that is 1B (x) = 1 if x ∈ B and 1B (x) = 0 otherwise. P Theorem 2.8. Let Xn be a sequence of independent random variables. The series Xn is a.s. convergent if and only if, for some A > 0, next three conditions are satisfied: P  (a) P |Xn | ≥ A is convergent, P (b) If Yn = Xn · 1{|Xn |≤A} , E(Yn ), the series of the expected values of Yn , is convergent, P (c) Var(Yn ) is convergent. Finally we state a corollary of Kolmogorov’s 0 − 1 Law. P Corollary 2.9. Let Xn be a sequence of independent random variables. Then, the series Xn is either a.s. convergent or a.s. divergent. 3 Proofs of the main results We start this section proving Theorem C. Afterwards, using it we will prove the first two items of Theorems A and B. Proof of Theorem C. (a) Left-hand equality (1) in Lemma 2.3 is X n−1 1 1  nan (fn − gn ) = Pn − an − Pi . ai+1 ai i=1 7 Putting  an an ai+1 − ai , if i < n, cn,i = 0, otherwise, Pn  we get that lim = lim 1 − aan1 = 1 and for any fixed i, lim cn,i = 0. Thus if lim Pn = l, ap- i=1 cn,i Pn−1  1 1  plying Theorem 2.1 to the sequence Pn and the coefficients cn,i we get lim an i=1 ai+1 − ai Pi = l and hence lim nan (fn − gn ) = 0. Clearly this last equality implies lim(fn − gn ) = 0 when lim inf nan > 0. The other statement follows directly from the right-hand equality (1) of Lemma 2.3. Moreover, dividing both sides of this equality by Un we get n−1 X i(ai − ai+1 ) Pn nan = (fn − gn ) + (fi − gi ). Un Un Un i=1 To prove item (b), take   i(ai −ai+1 )  Un , if i < n, cn,i = nan  Un , if i = n,  0, otherwise. P Then, ni=1 cn,i = 1 and for all i ∈ N, lim cn,i = 0. Thus the claimed chain of inequalities follows from Theorem 2.1. From these inequalities all the other results but one follow. Only remains to show that in general the condition about the convergence to zero of fn − gn is not a necessary condition for the convergence of a subseries. More specifically, we want toP prove the existence of sequences an and mn under the hypotheses of the theorem and such that mn an converges (then lim inf(fn − gn ) = 0) but lim(fn − gn ) does not exist. Note that since lim nan (fn − gn ) must be zero it follows that we need to choose an such that lim inf nan = 0. To do this we will specify both sequences, an and mn , based on a nice example constructed byPŠalat [18], with a different objective. In fact, to simplify the problem we will construct a series kn an , with kn ∈ {0, 1}. In this way gn ≡ 0 and fn − gn ≡ fn . 1 We will prove that if bn = mm+2 , where m is the unique natural number such that n ∈ m m+1 1 [m , (m + 1) ), an = bn + n2 and we set  1, if n ∈ [mm , 2mm ) for some m ∈ N, (3) kn = 0, otherwise, then the following assertions hold: P (I) an is a monotonous positive sequence, lim nan = 0 and the series an is divergent. P (II) lim sup fn ≥ 21 and kn an is convergent. To prove (I), note first that the sequence an is clearly positive and monotone because the sequence bn is non-increasing and n12 is monotonous decreasing. To see that lim nan = 0 it suffices to show that lim nbn = 0. To prove this, observe that for n ∈ [mm , (m + 1)m+1 ) we have n (m + 1)m+1 1 1 m+1 nbn = < = 1 + mm+2 mm+2 m m 8 that clearly tends to zero. Lastly note that (m+1)m+1 −1 X  1 mm+1 1 bi = (m + 1)m+1 − mm > = . mm+2 mm+2 m i=mm P P Thus bn is divergent and hence the same occurs for an . 1 To prove (II), note that f2mm ≥ 2 , because Pfrom (3) at least half of the kn until n =P2mm are 1 1’s. Then lim sup fn ≥ 2 . Finally, to see that kn an converges it suffices to show that kn bn is convergent. We have (m+1)m+1 −1 m X 2mX−1 mm 1 ki bi = bi = m+2 = 2 . m m i=mm i=mm P P Therefore kn bn is convergent and the same happens for kn an . Proof of Theorem A. Items (a) and (b) are a direct consequence of Theorem C and its proof. (c) We consider first the case l > a1 . The opposite situation Pn0 +1 follows similarly and we skip the details. Let n0 be the first natural number such that i=1 ai ≥ l. We choose ki = 1 for i = 1, . . . , n0 and kn0 +1 = 0. Now let n1 > n0 be the first natural number greater than n0 such that Sn0 + an1 < l. We choose ki = 0 for all i ∈ {n0 + 1, . . . , n1 − 1}. Note that l − Si = l − Sn0 +1 < an0 +1 for all i in this set. We also choose kn1 = 1 and let n2 be the first natural number greater than n1 such that Sn1 + an1 +1 + . . . + an2 +1 ≥ l. Now we choose ki = 1 for all i ∈ {n1 , . . . , n2 } and kn2 +1 = 0. In this way we obtain a sequence kn such that l − Sn is a positive non increasing sequence verifying that l − Snj < anj +1 for some partial nj , with j even. This shows that lim Sn = l. (d) Now we will construct a sequence kn ∈ {0, 1} such that for n large enough n X rn < Sn = ki ai ≤ rn + aϕ(n) i=1 where ϕ(n) is a non-decreasing sequence going to infinity. Notice that since lim rn −r an n−1 P 1that rn − rn−1 < an . Assume = 0, it is not restrictive to assume for instance that a1 < r1 and let n1 be the first integer such that ni=1 ai > rn1 . Observe that such rn a n1 exists because lim Un = 0. We choose ki = 1 for i ∈ {1, . . . , n1 }. Now let n2 be the first natural number greater than n1 such that rn2 > Sn1 . Now we choose ki = 0 for all i ∈ {n1 + 1, . . . , n2 − 1} and kn2 = 1. Clearly we have ri ≤ Si < ri +an1 for all i ∈ {n1 +1, . . . , n2 −1} and Sn2 = Sn1 +an2 ≥ rn2 −1 + an2 > rn2 because rn2 − rn2 −1 < an2 . Moreover Sn2 − rn2 < an2 . Proceeding P in this way we obtain a sequence ni and a sequence kn in such a way we have rn < Sn = ni=1 ki ai ≤ rn + anj for all n ∈ {nj , . . . , nj+1 }. Thus we have Sn − rn 0< ≤ anj , rn for all n ∈ {nj , . . . , nj+1 }. Passing to the limit we get lim Srnn = 1. Observe now that lim inf fn = 0. If not, lim inf USnn = lim inf Urnn > 0 giving a contradiction. This ends the proof of the Theorem. 9 Proof of Corollary 1.1. Recall that by the results of Hadamard and de la Vallée-Poussin the density of the prime numbers smaller than n is asymptotic to ln1n . Hence, by the second part of item (a) of Theorem A the convergence of the series involving the prime numbers depends on the convergence of the series with terms n(an − an+1 )fn ∼ lnnn (an − an+1 ), where an = h(n), with h(x) = x(ln x)α1(ln ln x)β . It is not difficult to see for any α ≥ 0, β ≥ 0, we are under the hypotheses of Lemma 2.5. Hence an+1 − an ∼ h0 (n) ∼ − n2 (ln n)α1(ln ln n)β and, as a consequence, n 1 n(an − an+1 )fn ∼ (an − an+1 ) ∼ . ln n n(ln n)α+1 (ln ln n)β P 1 By the Integral Convergence test, the series n(ln n)δ is convergent if and only if δ > 1. Hence, since n(ln n)α+1 (ln ln n)β ≥ n(ln n)α+1 , the result follows for α > 0. P 1 Consider now α = 0. Again by the Integral Convergence test, the series n ln n(ln ln n)β is 1 1  0 1 convergent if and only if β > 1, because for β 6= 1, 1−β (ln ln x)β−1 = x ln x(ln ln x)β and (ln ln ln x)0 = 1 x ln x(ln ln x) . Hence the corollary follows. In fact, these series were used by Hardy [5, 14], with β = 1, 2, to illustrate the series that either diverge or converge very slowly. A direct consequence of the second part of statement (a) of Theorem A is next result that gives a kind of comparison test between the densities of 1’s. Corollary 3.1. Let kn , kn0 be sequences such that kn , kn0 ∈ {0, 1}, let fn , fn0 be their corresponding sequences of densities of 1’s and let Sn , Sn0 be their corresponding sequences of partial sums. Assume that lim nan fn = lim nan fn0 = 0. Then the following statements hold. • If fn ≤ fn0 and Sn0 converges, then Sn converges. • If fn ≥ fn0 and Sn0 diverges, then Sn diverges. • If lim ffn0 = C 6= 0 then both series have de same character. n Proof of Theorem B. Similarly that in Theorem A, items (i) and (ii) are a direct consequence of Theorem C. Only one example of a convergent signed subseries such that the lim(fn − gn ) = lim(2fn − 1) does not exist, must be given. Such an example can be constructed similarly to the one with gn ≡ 0 given in the proof of Theorem C. We omit the details. (iii) Assume without loss of generality Pi1 that l ≥ 0. If l ≥ a1 put k1 = 1 and let i1 be the first natural number such that Si1 = i=1 ai > l. P We chooseP ki = 1 if i ∈ {1, . . . , i1 }. Now let i2 > i1 be the first natural number such that Si2 = ii=1 1 ai − ii=i 2 1 +1 i a < l. Then we choose ki = −1 if i ∈ {i1 + 1, . . . , , i2 }. Note that |Si − l| < ai1 for any i ∈ [i1 , i2 ]. In this way we can define an increasing sequence ij and kn ∈ {1, −1} given by  1, if n ∈ {ij + 1, . . . , ij+1 } for some even j, kn = −1, if n ∈ {ij + 1, . . . , ij+1 } for some odd j, where i0 := 0. Note that we will get |Si − l| < aij if i > ij . This ends the proof when l ≥ a1 . The other cases follow by obvious adaptations of this proof. 10 To prove item (iv) we consider the sequences bn = a2n and cn = a2n−1 . Set ren = 21 r2n . We have   r̃n − r̃n−1 1 r2n − r2n−2 1 r2n − r2n−1 r2n−1 − r2n−2 0< = = + . bn 2 a2n 2 a2n a2n Thus passing to the limit we get by hypothesis that lim r̃n −r̃ bn n−1 = 0, because 0 < r2n −r a2n 2n−1 < r2n −r2n−1 a2n+1 . Hence the sequence ren satisfies the hypotheses of item (d) of Theorem A with respect Pn to the series i=1 bi . P n i=1 ki a2i Therefore we get that there exists a sequence kn ∈ {0, 1} such that lim 1 r = 1. Define 2 2n  −1 + 2ki/2 , if i is even, ji = 1, otherwise. P2n Pn Pn Pn We have T2n = i=1 ji ai =− i=1 bi +2 i=1 ki bi + i=1 ci . Hence Pn Pn Pn T2n i=1 ci − i=1 bi +2 i=1 ki bi = . r2n r2n Now we claim that ! n X n X lim ci − bi = M ∈ R. i=1 i=1 To see this let h : [1, ∞) :−→ R x (0, ∞) be a continuous decreasing function satisfying h(n) = an for all n ∈ N and let H(x) = 1 h(s)ds. From Lemma 2.4 there exist L1 , M1 ∈ R such that n Z ! n Z ! X n X n lim bi − h(2s)ds = L1 and lim ci − h(2s − 1)ds = M1 . i=1 1 i=1 1 Thus we get n n ! Z Z X X 1 2 1 2n lim bi − ci = L1 − M1 − h(s)ds + lim h(s)ds = M 2 1 2 2n−1 i=1 i=1 and the claim follows. Hence, Pn Pn T2n 2 i=1 ki bi i=1 ki a2i lim = lim = lim 1 = 1. r2n r2n 2 r2n Similar computations show that also lim Tr2n+1 2n+1 = 1, and so lim Trnn = 1. Lastly we get 12 ∈ [lim inf fn , lim sup fn ]. Otherwise, either lim inf fn > 12 or lim sup fn < 12 . In the first case from item (ii) we obtain lim inf UTnn ≥ lim inf(2fn − 1) > 0 and hence UTnn > r for some r > 0 and n large enough, in contradiction with the hypothesis. In the other case we arrive to contradiction arguing with lim sup UTnn . 11 4 Random series In this section we prove Theorem D and compare it with a corollary of our theorems on deterministic series. We end with a test example. Proof of Theorem D. We will apply the Kolmogorov’s Three-Series Theorem to the sequence of independent random variables Xn = an Wn . Since an tends Pnto zero, given any A > 0, there exits n0 such that for all n > n0 , P |Xn | ≥ A = 0. Hence the i=1 P |Xi | ≥ A always converges and item (a) of the theorem is satisfied for any A > 0. Similarly, P for any n big enough, P Yn = Xn ·1{|Xn |≤A} = Xn . Hence E(Yn ) = an E(W P n ) = (p−q)an . Then ni=n0 E(Yi ) = (p−q) ni=n0 ai , that converges if and only if p = q, because ni=1 ai diverges. Hence item (b) of the theorem holds if and only if p = q. Finally, for p = q and again for n > n0 ,  Var(Yn ) = Var(Xn ) = Var an Wn = a2n Var(W1 ). P P Since Var(W1 ) = 2p > 0, ni=1 Var(Yi ) converges if and only if ni=1 a2i converges, as we wanted to prove. P When either p 6= q or ni=1 a2i diverges, by Corollary 2.9, the random series diverges a.s. and the theorem follows. As we will see, the results obtained applying Theorem C together with a consequence of the Law of the Iterated Logarithm (Corollary 2.7) are weaker that the ones stated by using the Kolmogorov’s Three-Series Theorem, given in Theorem D. Nevertheless, we briefly discuss them because we believe that it is nice to see how from the study of properties of related deterministic series it is also possible to get as a consequence results about a.s. convergence of random series. P Corollary 4.1. Let an be a positive P sequence that tends monotonically to 0 and such that an = ∞. Consider the random series Z = an Wn , where Wn are i.i.d. random variables with distribu- tion W(p, q). The following holds: (i) If p 6= q then Z is a.s. divergent. R (ii) If p = q and an ≥ √ n ln ln n , for n ≥ n0 and some R > 0, then Z is a.s. divergent. P√  (iii) If p = q and n ln ln n an − an+1 converges then Z is a.s. convergent. Proof. Let Fn (resp. Gn ) be the random variable that gives the density of 1’s (resp. −1’s) in the sequence Wn . We know from Corollary 2.7 that for almost all ω, the sequence fn = Fn (ω) and gn = Gn (ω) satisfy √  √  n fn − gn − (p − q) n fn − gn − (p − q) (4) lim inf √ = −L and lim sup √ = L, ln ln n ln ln n p with L = 2(p + q − (p − q)2 ) . Fixed two of these sequences fn and gn we also know that r ln ln n (5) fn − gn − (p − q) ≤ K , n 12 for some K > L. Therefore, to prove the corollary we can assume that the densities of 1’s and −1’s in the series Z(ω) are given by sequences fn and gn satisfying (4) and (5). P (i) As a consequence of Theorem C we get that when mn an is convergent and fn − gn converges, then it converges towards 0. Since we know that fn − gn converges towards p − q, we get that Z is a.s. divergent when p − q 6= 0. (ii) To prove that Z is a.s. divergent we will use item (a) of Theorem C and (4). Since p = q, notice that √ R n lim sup nan fn − gn ≥ lim sup √ fn − gn = RL > 0. ln ln n Hence lim nan (fn − gn ) 6= 0 and Z is a.s. divergent. P (iii) Again, by Theorem C, to prove that Z is a.s. convergent it suffices to show that n(an − an+1 )(fn − gn ) is convergent. We will use that the sequence fn satisfies (5) and p = q. This holds because r  ln ln n  √  n an − an+1 fn − gn ≤ Kn an − an+1 = K n ln ln n an − an+1 , n which, by hypothesis (iii), is precisely the general term of a convergent series. We end the paper comparing the results of applying Theorem D and the above corollary to a test family of random series. We consider X Wn W α,β = , α > 0, β ≥ 0, n lnβ α n where Wn are i.i.d. random variables with distribution W(p, q). Both results imply that W α,β is a.s. divergent unless p =Pq. Hence we fix p = q. Then, notice that by Theorem D, W α,β is a.s. 1 convergent if and only if n2α ln2β n is convergent, and otherwise W α,β is a.s. divergent. Table 1 collects the final results obtained when P p = q. There we have also used the trivial Presult that if bn is a positive sequence such that bn is convergent then the random sequence bn Wn is also (always) convergent . 1 1 1 0<α< 2 α= 2 2 <α<1 α=1 α>1 1 0≤β≤ 2 a.s. div. a.s. div. (∗) a.s. conv. a.s. conv. conv. 1 2 <β≤1 a.s. div. a.s. conv. (∗) a.s. conv. a.s. conv. conv. β>1 a.s. div. a.s. conv. a.s. conv. conv. conv. Table 1: Behavior of the random series W α,β , with p = q, according to α and β. Cases with (∗) are covered by the Kolmogorov’s Three-Series Theorem but not by our approach. If, instead of Theorem D, we apply items (ii) and (iii) of Corollary 4.1 we recover all the results of that table except the ones corresponding to α = 12 and 0 ≤ β ≤ 1. In this range of values our approach does not decide the behavior of the random series. 13 Acknowledgments The first author is supported by a MINECO/FEDER grant number MTM2016-77278-P and CIRIT grant number 2014 SGR 568. The second author by a MINECO/FEDER grant number MTM2014- 52209-C2-1-P and CIRIT grant number 2014 SGR 555. References [1] P. T. Bateman, H. G. Diamond, Analytic number theory. An introductory course. Monographs in Number Theory, 1. World Scientific Publishing Co. Pte. Ltd., Hackensack, NJ, 2004. [2] C. R. Banerjee, B. K. Lahiri, On subseries of divergent series, Amer. Math. Monthly 71 (1964) 767–768. [3] P. Billingsley, Probability and Measure, 2nd ed. John Wiley & Sons, New York, 1986. [4] V. Brun, La série 1/5 + 1/7 + 1/11 + 1/13 + 1/17 + 1/19 + 1/29 + 1/31 + 1/41 + 1/43 + 1/59 + 1/61 + . . . , où les dénominateurs sont nombres premiers jumeaux est convergente ou finie, Bull. des Sci. Mathématiques 43 (1919) 100–104, 124–128. [5] G. H. Hardy, Orders of infinity. Cambridge Univ. Press, 1910. [6] G. H. Hardy, Divergent Series. Oxford, at the Clarendon Press, 1949. [7] J. Havil, Gamma: Exploring Euler’s Constant. Princeton, NJ: Princeton University Press 2003. [8] K. Itô, An Introduction to Probability Theory. Cambridge University Press, 1984. [9] J. C. Lagarias, Euler’s constant: Euler’s work and modern developments, Bul. of the AMS 50 (2013) 527–628. [10] B. Lubeck, V. Ponomarenko, Subsums of the Harmonic Series, Accessible at http://vadim.sdsu.edu/lp.pdf [11] F. Mertens, Ein Beitrag zur analytischen Zahlentheorie, J. Reine Angew. Math. 78 (1874), 46–62. [12] K. E. Morrison, Cosine Products, Fourier Transforms, and Random Sums, Amer. Math. Monthly 102 (1995) 716–724. P [13] L. Moser, On the series, 1/p. Amer. Math. Monthly 65 (1958) 104–105. [14] C. P. Niculescu, G. T. Prǎjiturǎ, Some open problems concerning the convergence of positive series, Ann. Acad. Rom. Sci. Ser. Math. Appl. 6 (2014) 92–107. [15] P. Pollack, Euler and the partial sums of the prime harmonic series, Elem. Math. 70 (2015) 13–20. 14 [16] B. J. Powell, Primitive densities of certain sets of primes, J. Number Theory 12 (1980), 210–217. [17] B. J. Powell, T. Salát, Convergence of subseries of the harmonic series and asymptotic den- sities of sets of positive integers, Publ. Inst. Math. (Beograd) (N.S.) 50 (1991), 60–70. [18] T. Šalát, On subseries, Math. Z. 85 (1964) 209–225. [19] T. Šalát, On subseries of divergent series, Mat. Casopis Sloven. Akad. Vied 18 (1968) 312–338. [20] J. A. Scott, On infinite series over the primes, The Mathematical Gazette 95, Issue 534 (2011) 517–518. [21] J. P. Tull, D. Rearick, Mathematical Notes: A Convergence Criterion for Positive Series, Amer. Math. Monthly 71 (1964) 294–295. 15