New Bounds and Computations on Prime-Indexed Primes

In a 2009 article, Barnett and Broughan considered the set of prime-index primes. If the prime numbers are listed in increasing order (2, 3, 5, 7, 11, 13, 17, . . .), then the prime-index primes are those which occur in a prime-numbered position in the list (3, 5, 11, 17, . . .). Barnett and Broughan established a prime-indexed prime number theorem analogous to the standard prime number theorem and gave an asymptotic for the size of the n-th prime-indexed prime. We give explicit upper and lower bounds for π2(x), the number of prime-indexed primes up to x, as well as upper and lower bounds on the n-th prime-indexed prime, all improvements on the bounds from 2009. We also prove analogous results for higher iterates of the sequence of primes. We present empirical results on large gaps between prime-index primes, the sum of inverses of the prime-index primes, and an analog of Goldbach’s conjecture for prime-index primes.


Introduction
Many of the classes of primes typically studied by number theorists concern properties of primes dictated by the positive integers.Twin primes, for example, are consecutive primes with an absolute difference of 2. It is interesting, however, to consider a sequence of primes whose members are determined by the primes themselves.
In this work, we consider the set of prime-indexed-primes (or PIPs), which are prime numbers whose index in the increasing list of all primes is itself prime.In particular we have: Definition 1.1.Let P be the sequence of primes written in increasing order {p i } i≥1 .The sequence of prime-indexed-primes, or PIPs, is the subsequence of P where the index i is itself prime.Specifically, the sequence of prime-indexed primes is given by {q i } where q i = p pi for all i ≥ 1.
Prime-indexed-primes seem to have been first considered in 1965 by Jordan [1], who also considered primes indexed by other arithmetic sequences.They were again studied in 1975 by Dressler and Parker [2], who showed that every positive integer greater than 96 is representable by the sum of distinct PIPs.Later, Sándor [3] built on Jordan's work of considering the general question of primes indexed by an arithmetic sequence by studying reciprocal sums of such primes and limit points of the difference of two consecutive primes.Some of these results can be found in [4, p. 248-249].
The direct inspiration of this work is the recent work of Broughan and Barnett [5], who have demonstrated many properties of PIPs, giving bounds on the n-th PIP, a PIP counting function (analogous to the prime number theorem), and some results on small gaps between consecutive PIPs.
We note also the equivalent definition of PIPs, which may be of some use.If we let, as usual, π(x) be the number of primes not greater than x, then an integer p is a PIP if both p and π(p) are prime.

Preliminary Lemmas
In this section we state a few lemmas which will be helpful in the proofs of the theorems in the remaining sections of this paper.The proofs consist of technical details, and contain no insight of direct relevance to the rest of the paper, so we defer their proofs to Section 10.First, we give a pair of bounds comparing combinations of n and log n to log log n.
We will also need two lemmas bounding the reciprocal of log π(x), one for explicit bounds and one for asymptotic bounds.

Bounds on PIPs
Broughan and Barnett were the first to put upper and lower bounds on q n , the n-th PIP.In particular, they show By using some theorems of Dusart [6], we show that these bounds can both be improved and made explicit.
Theorem 3.1.For all n ≥ 3, we have and for all n ≥ 71, we have .
Proof.We begin with the lower bound.Using the result of Dusart [6] that for all n ≥ 2, we have for all n ≥ 3 that we may bound > n (log n + log log n − 1) (log n + 2 log log n − 1) .
Turning to the upper bound, we use a result of Rosser and Schoenfeld [7], that: for n ≥ 20.To simplify the notation here, let This gives that for n ≥ 71, Putting these into (3.2),we can bound , which is the bound in the theorem.
In fact, using an upper bound on p n due to Robin [8]

Bounds for the Number of Prime-Indexed-Primes
Define π 2 (x) to be the number of PIPs not greater than x.Note that it follows immediately from the definition that π 2 (x) = π(π(x)).Broughan and Barnett show that x , and also give the slightly more sophisticated With respect to the classical prime number theorem, a study of the error term has driven much research in number theory.Among the known results [6, page 16] is We also have a number of known explicit bounds on π(x), including [6, page 2] where the lower bound holds for x ≥ 599 and the upper bound holds for x > 1.
Based on this work, we are able to prove the following theorem.
Theorem 4.1.For all x ≥ 3, we have by Lemma 2.3, for all x ≥ 4397.A computer check shows that the bound also holds for all 179 ≤ x ≤ 4397, completing the proof of the theorem.1: Values of π 2 (x) and of π 3 (x) for small powers of 10 Small improvements can be made to the bounds in Theorem 4.1, at the expense of the relative simplicity in the statement.However, the lower bound is much closer to the truth.Using a stronger version of (4.2) and a finer version of Lemma 2.3 it is possible to prove the following theorem.Theorem 4.2.We have Table 4 gives the values of π(x) and π 2 (x) for powers of 10 up to 10 24 .The table also gives values of π 3 (x), the number of PIPs of prime index up to x (see a definition and further generalization in Section 7).The values of π(x) up to 10 23 , as well as all values of π 2 (x) and of π 3 (x), were computed using an implementation of the Lagarias-Miller-Odlyzko algorithm [9] described in [10].The value of π 10 24 was computed in 2010 by Buethe, Franke, Jost, and Kleinjung [11] using a conditional (on the Riemann hypothesis) analytic method, and latter confirmed in 2012 by Platt [12] using an unconditional analytic method.

Twin PIPs
Twin primes are pairs of primes which are as close together as possible -namely, they are consecutive odd numbers which are both prime.We will define twin primeindexed primes, or twin PIPs, with a similar motivation, that is, they are PIPs which are as close together as possible.Since two consecutive indices cannot be prime, there must always be at least one prime between consecutive PIPs (except for the trivial case q 2 = 3, q 3 = 5).Futhermore, we know that p, p + 2, and p + 4 cannot be simulatenously prime, since 3 always divides one of them, and thus the smallest distance between consecutive PIPs is 6.To this end, we make the following definition.
Definition 5.1.Let p and q be PIPs.We say that they are twin PIPs if p − q = 6.
The twin prime conjecture states that there are infinitely many twin primes, and Broughan and Barnett conjecture that there are infinitely many consecutive PIPs with a difference of 6 (and indeed they conjecture that all gaps of even size at least 6 appear infinitely often).However, the Twin Prime Conjecture has a strong form, which states that where π 2 (x) is the number of twin primes not greater than x, , where is the twin prime constant.One of the reasons that number theorists have faith in the twin prime conjecture is that the strong form of the conjecture seems to be very accurate.Experimentally we see that the data conform to this conjecture remarkably closely.The twin prime conjecture predicts that the number of primes up to 4 × 10 18 is about The third author has calculated this value precisely [13], and found π 2 (4 × 10 18 ) = 3023463123235320, which impressively agree in the first eight digits.The basic idea behind the strong form of the twin prime conjecture is that the events "p is prime" and "p + 2 is prime" are not independent events (details can be found in, say, [14, pp. 14-16]).Similar reasoning applies to twin PIPs.In particular, we consider the following question: if q is a PIP, what is the probability that q + 6 is also a PIP?We must have either that q, q + 2, q + 6 are all prime, or that q, q + 4, q + 6 are all prime.But it is not enough for q + 6 to be prime; it must also be a PIP.Combining these ideas, we find the following Theorem 5.2.If a prime q with index n is the first of a pair of twin PIPs, then one of two cases hold.Either: The triple (q, q + 2, q + 6) are all prime, or the triple (q, q + 4, q + 6) are all prime.Furthermore, the index of q and q + 6 must each be prime.
From this theorem we can construct a heuristic bound on the density of twin PIPs.
Conjecture 5.3.The number of twin PIPs up to x, π 2 2 (x), is asymptotically Argument.Hardy and Little established conjectures on the density of prime constellations a century ago [15], and though unproven they are widely accepted, and enjoy considerable empirical support.Their conjectured density of either triple given in Theorem 5.2 is asymptotically We expect, as we have throughout this paper, that we can treat the primality of the index of a prime q as independent of q.Let n be the index of q.Then n + 2 is the index of the prime q + 6.The probability of both n and n + 2 being prime is heuristically If we simply multiply our earlier heuristic by the probability of this additional restriction, we find an expected density of twin PIPs to be Evaluating the product gives t(log t − loglog t) 2 .This heuristic seems to describe the distribution of twin PIPs quite well.The following table gives the predicted number and actual number of twin PIPs up to various powers of 10, together with the absolute and relative error at each stage.

The Sum of the Reciprocals of the PIPs
The asymptotic density of the PIPs is O(x/ log 2 x), from which it follows that the sum of the reciprocals of the PIPs converges (as noted first in [1]).Reciprocal sums have some interest in themselves; bounding Brun's constant, the sum of the reciprocals of the twin primes, has been a goal of many mathematicians since at least 1974 [16,17,18,19,20].However, the accuracy of bounds on reciprocal sums also measures in an important way how much we understand a particular class of numbers.Bounding a reciprocal sum well requires two things: first, a computationally determined bound on small integers from the class; and second, good explicit bounds on the density of large integers from the class.
By this measure, twin primes are understood much better than, say, amicable numbers.Let B be the sum of the reciprocals of the twin primes.Then B has been shown to satisfy [14] 1.83 < B < 2.347, and in fact [20] 1.83 < B < 2.15, assuming the Extended Riemann Hypothesis.By contrast, let P be the Pomerance Constant -the sum of the reciprocals of the amicable numbers.Then the best known bounds on P [21] are the fairly weak 0.01198 < P < 6.56 × 10 8 .
Comparing the size of these intervals shows that, in a measurable way, current mathematical knowledge about twin primes is better than that of amicable numbers.With this is mind, we are interested in determining the accuracy to which we can bound the sum of the reciprocals of the PIPs.
By generating all PIPs up to 10 15 using the obvious expedient of employing two segmented Erathosthenes sieves [22], one to check the primality of each odd n in that interval and another to check the primality of π(n), and by accumulating the sum of the inverses of the PIPs using a 192-bits fractional part, it we find that q≤10 15   1 q ≈ 1.01243131879802898253.(6.1) When u and v are not PIPs, the sum x can be reasonably well approximated by replacing π(x) by li(x) = x 0 dt log t .This yields Due to potential arithmetic overflow problems when x is large, in this last integral log li(e x ) should be evaluated by replacing it by its asymptotic expansion li(e x ) ≈ x − log x + log N k=0 k! x k ; N = x delivers an approximation with relative error close to √ 2πx e −x .This is not enough to evaluate T (10 15 , ∞) directly with an absolute error smaller that 5 × 10 −21 , so T (10 15 , 10 100 ) can be numerically integrated without using the asymptotic expansion, and then T (10 100 , ∞) can be numerically integrated using the asymptotic expansion.Both Mathematica and pari-gp agree that T (10 15  , ∞) = 0.03077020549198786752.
Another approach to finding the sum of the reciprocals of the PIPs is to use the explicit upper and lower bounds on π 2 (x) from Theorem 4.1, our calculations to 10 15 , and partial summation to bound the sum.Let us label the upper bound on π 2 (x) as π 2 u (x), and the lower bound as π 2 l (x).Then we have and In fact, these functions π 2 u (x) and π 2 l (x) do a fairly good job bounding π 2 (x) past 10 15 , as determined by the difference in the integrals above.Numerical calculation with Mathematica gives the following: Combining these values with the calculation in (6.1), we can show that the sum of the reciprocals of the PIPs satisfies 1.04299 < q 1 q < 1.04365, in good agreement with (6.2).

The Generalized Prime Number Theorem
It is natural to consider a further generalization of prime-index primes.If the set of primes is listed in order, the subsequence of prime-index primes could be called 2-primes.Similarly, if the set of 2-primes is listed in increasing order, we may call the subsequence with prime index 3-primes.Let a k-prime be a member of the k-th iteration of this process.One may ask for the analogous results on the n-th k-prime and the number of k-primes up to x.
As noted in Broughan and Barnett [5], it is not hard to establish an analog to the Prime Number Theorem.Namely, defining π k (x) as the number of k-primes less than or equal to x, it is easy to show that In fact, it can be shown that π k (x) ∼ Li k (x) as x → ∞.The proof of this statement is not difficult, but is also not very enlightening.The theorem we prove here is slightly weaker, but shows more of the shape of the three main terms in this asymptotic.
Theorem 7.1.For all k ≥ 1, Proof.The proof proceeds by induction on k.The case k = 1 is given in (4.1), so we assume the statement holds up to k.Then, by the induction hypothesis.Now, Lemma 2.4 gives that Putting this together with (4.1) gives that , completing the theorem's proof.
Using Theorem 4.1 as the base case and Lemma 2.3 for the inductive step, we can prove the following theorem giving explicit bounds on π k (x).Theorem 7.2.For all k ≥ 2, there exists a computable x 0 (k) such that Note that from the proof of Lemma 2.3 and Theorem 4.1 we may choose any It is also not difficult to adapt an argument from [5] to prove a proposition on π k (x) for all k ≥ 1.
Proposition 7.3.The following inequalities are true for every integer n > 1 and k ≥ 1 and for all sufficiently large real numbers x, y: Proof.Each of the statements in this theorem have been shown for k = 2 in [5] and for k = 1 elsewhere ((a) in [23], (b) and (c) in [24]).We assume these base cases and follow the argument in [5] to complete the induction for each statement.
(a) From Panaitopol [23], we have π(nx) < nπ(x) for sufficiently large x.The induction hypothesis, followed by an application of Panaitopol's result gives for sufficiently large x.
(b) Using Montgomery and Vaughan's [24] bound π(x+y) ≤ π(x)+2π(y) together with the induction hypothesis, we have for sufficiently large x and y.
(c) This follows from part (b) and Theorem 7.1.
Note that these bounds are certainly not the best possible.Inequality (b) in particular seems rather weak.Proving a stronger general theorem, however, seems difficult.

Gaps Between PIPs
Our consideration in Section 5 of twin PIPs, or consecutive PIPs with difference 6, is just a special case of a more general question about gaps between consecutive PIPs.In this section we consider some computational data on other gap sizes.Let q(h) = min qi+1−qi=h q i be the first occurrence of a gap of size h between PIPs (or infinity if no such gap exists), let be the number of gaps of h between PIPs up to x, and let be the corresponding Hardy-Littlewood correction factor.As expected due to the prime k-tuples conjecture, it was found that the graph of Q(10 15 ; h) exhibited a rapid "oscillation" (cf., for example, [25]), which disappeared in a graph of Q(10 15 ; h)/F (h).Contrary to what happens with the graphs of smoothed counts of prime gaps (i.e., counts divided by F (h)), the graphs of smoothed counts of PIP gaps first increase, then attain a maximum at an absissa which grows with the count limit x, and only then start to decrease exponentially (this behavior can be observed in figure 1 of [5]).
Table 8 presents the record gaps (also known as maximal gaps [26]) that were observed up to 10 15 .Since a large gap between primes very likely corresponds to a large gap between PIPs (having the large prime gap between their indices), the first ten occurrences of each prime gap up to 4 × 10 18 , obtained as a colateral result of the third author's extensive verification of the Goldbach conjecture [?], were used to locate large gaps between PIPs.This was done as follows: 1. given an index i (the first prime of a large prime gap), an approximation pi of p i was found by solving |π(p i ) − i| < 10, where π(x) is the Riemann's formula for π(x), truncated to the first one million complex conjugate zeros on the critical line, and with lower order terms replaced by simpler asymptotic approximations; 2. using the algorithm described in [10], π(p i ) was computed (this was by far the most time consuming step); 3. using a segmented sieve and using pi as a starting point, going backwards if necessary, p i , which is by construction a PIP, was located; 4. since the gap between indices was known a priori, the next PIP was also located, and the difference between the two was computed.
The maximal gap candidates above 10 15 that resulted from this effort are presented in Table 8; below 10 15 , the results of Table 8 were reproduced exactly.Based on the data from these two tables, it appears that h/ log 3 q(h) is bounded.Let R(n) be the number of pairs (q, n − q) such that both q and n − q are PIPs.Just like for the classical Goldbach conjecture [27], the identity For n even, these two non-decreasing functions are useful lower and upper bounds of the value of R(n). Figure 9 shows how these two functions behave (their points of increase up to L = 10 9 were computed with the help of a simple matlab script).Based on our empirical data, the following conjecture is almost certainly true.
Conjecture 9.1.All even integers larger than 80612 can be expressed as the sum of two prime-indexed primes.Let R(n) be the number of pairs (q, n − q) such that both q and n − q are PIPs.Just like for the classical Goldbach conjecture [20], the identity For n even, these two non-decreasing functions are useful lower and upper bounds of the value of R(n). Figure 1 shows how these two functions behave (their points of increase up to L = 10 9 were computed with the help of a simple matlab script).
fast polynomial multiplication algorithm based on the Fast Fourier Transform, makes it possible to compute R(n) for all n ≤ L using only O(L 1+ ) time and space.For L a positive even integer, let R lower (x; L) = min x≤2n≤L R(2n) and R upper (x) = max n≤x R(n).

Figure 1 . 9 .
Figure 1.Lower and upper bounds of the number of ways, offset by one, of expressing an even number by an ordered sum of two PIPs.9. A Goldbach-like conjecture for PIPs

R
(n) x n = q≤L x q 2 mod x L+1 , coupled with a fast polynomial multiplication algorithm based on the Fast Fourier Transform, makes it possible to compute R(n) for all n ≤ L using only O(L 1+ ) time and space.For L a positive even integer, let R lower (x; L) = min x≤2n≤L R(2n) and R upper (x) = max n≤x R(n).

computer check verifies the upper
bound for 3 ≤ x ≤ 3030.For the lower bound, we can use (4.2) to see that

Table 2 :
Actual counts, predicted values, absolute and relative errors for π 2 2 (x) at small powers of 10.

Table 4 :
Potential record gaps between PIPs after 10 15 9.A Goldbach-Like Conjecture for PIPs