Tight upper and lower bounds for the reciprocal sum of Proth primes

Computing the reciprocal sum of sparse integer sequences with tight upper and lower bounds is far from trivial. In the case of Carmichael numbers or twin primes even the first decimal digit is unknown. For accurate bounds the exact structure of the sequences needs to be unfolded. In this paper we present explicit bounds for the sum of reciprocals of Proth primes with nine decimal digit precision. We show closed formulae for calculating the nth Proth number Fn\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$F_n$$\end{document}, the number of Proth numbers up to n, and the sum of the first n Proth numbers. We give an efficiently computable analytic expression with linear order of convergence for the sum of the reciprocals of the Proth numbers involving the Ψ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Psi $$\end{document} function (the logarithmic derivative of the gamma function). We disprove two conjectures of Zhi-Wei Sun regarding the distribution of Proth primes.


Introduction
A Proth number is a natural number of the form where k, s ∈ N, k is odd and k < 2 s . Fermat numbers (k = 1, s = 2 t ) and Cullen numbers (k = s) are special cases of Proth numbers. A Proth prime is a Proth number that is prime in N. Let us denote the set of Proth numbers by F in honour of François Proth, who introduced these numbers in his 1878 paper [1], the set of primes by P and the Proth primes by R = F ∩ P. We consider F and R as well-ordered sets, and we denote the n th Proth number and the n th Proth prime by F n ∈ F and R n ∈ R, respectively. The first few Proth primes are R = {3, 5, 13, 17, 41, 97, 113, 193, 241, 257, . . .}.
The largest known element in R is 10223 · 2 31172165 + 1, having 9 383 761 decimal digits, found by the PrimeGrid distributed computing project in 2016 [2]. This is the largest known non-Mersenne prime number.
The theory of Proth numbers and Proth primes is surprisingly limited, and even basic results were not documented in scientific literature.
An odd k is called a Sierpiński number if k · 2 s + 1 is composite for all natural numbers s. In 1960 Sierpiński [3] showed that there are infinitely many such k ∈ N without giving an explicit example. In 1962 Selfridge showed that all numbers of the form 78557 · 2 s + 1 have a factor in the covering set {3, 5, 7, 13, 19, 37, 73}. It is conjectured that k = 78557 is the least Sierpiński number. For s > 16 the number of the form 78557 · 2 s + 1 is always a composite Proth number. In 1979 [4] Erdős and Odlyzko investigated the natural density of the prime numbers of the form k · 2 s + 1 without the k < 2 s restriction. It was shown that odd integers k such that k · 2 s + 1 is prime for some positive integer s have a positive lower density. Sun and Fang [5] characterized all arithmetic progressions in which natural numbers that can be expressed in the form ( p − 1)2 −s have a positive proportion ( p ∈ P). Applying the k < 2 s restriction it is still unknown whether there are infinitely many primes of the form k · 2 s + 1. This implies that the structure of Proth numbers is not easy to exploit.
One can observe that the set of Proth numbers consists of infinitely many finite arithmetic progressions with increasing length. Assuming the Generalized Riemann Hypothesis (GRH) one can prove that there exists at least one prime in the arithmetic progression k · 2 s + 1 with k < 2 s+ . Without the additional the prime counting problem becomes extremely hard. Solving the problem of Siegel zeroes could help, however, this seems even harder. We note that the existence of infinitely many Proth primes follows immediately from the Montgomery conjecture [6].
The reciprocal sum of a set of integers can be considered a density measure. Finding tight lower and upper bounds for sparse sets could be challenging. In 1994 Alford, Granville, and Pomerance [7] proved that there are infinitely many Carmichael numbers. In 2017 Bayless and Kinlaw [8] gave explicit bounds for the reciprocal sum of Carmichael numbers, i.e. 0.004706 < 1 C < 27.8724 . Another example is the sum of the reciprocals of twin primes (denoted by B 2 ). In 1919 Brun showed that B 2 converges to a finite value [9]. The first upper bound was given in 2005 by Crandall and Pomerance [10], who showed that B 2 < 2.347. In 2007 Klyve [11] showed that under the assumption of the GRH we have B 2 < 2.1754. Recently, Platt and Trudgian [12] showed that B 2 < 2.288490, unconditionally. There is a huge gap between the best known upper and lower bounds, and even assuming the GRH, we cannot provide the first digit of B 2 . This shows the difficulty of characterizing the distribution of twin primes. The prime-indexed primes, the subsequence of prime numbers that occupy prime-numbered positions within the sequence of all prime numbers Q = {3, 5, 11, . . .}, were first considered by Dressler and Parkler [13] in 1975. In 2014 Bayless, Klyve, and Oliveira e Silva showed [14] that the sum of reciprocals of such primes is convergent, i.e. 1.04299 < q∈Q 1/q < 1.04365 . The two decimal digit precision shows that the distribution of prime-indexed primes is better understood than that of twin primes.
Let us denote the sum of the reciprocals of Proth numbers by and the sum of the reciprocals of the Proth primes by In this paper we show that 0.7473924793 < ω R < 0.7473924795. We were able to achieve this result by (1) enumerating F using an efficient method and (2) finding a tight analytic expression for ω F , namely Theorem 1.1 ω F < log 3 and where is the digamma function, i.e.
We show that ω F can be calculated with linear order of convergence. To the best of our knowledge ω R is the most accurate sum reciprocal constant involving non-trivial types of prime numbers.
The paper is organized as follows: The second section of this paper deals with the theory of Proth numbers. We present closed formulae for calculating the nth Proth number F n and a closed formula for the number of Proth numbers up to n. The third section is about the distribution of Proth numbers among squares. The fourth section is about the closed form of the sum of the first n Proth numbers. In the fifth section we show that the sum of the reciprocals of the Proth numbers and Proth primes are convergent. An efficiently computable analytic expression for the sum of the reciprocals of the Proth numbers involving the function is presented. In the sixth section we disprove two conjectures of Zhi-Wei Sun regarding the distribution of Proth primes based on numerical computations of Proth primes up to 2 72 . All formulae presented in this paper were implemented in PARI/GP and can be downloaded from the authors website.

On Proth numbers
For n ∈ N we often use the canonical binary expansion (base-2 representation) of n. For example, 41 = (101001) 2 ∈ F. Let us denote the number of the trailing zeroes of the binary representation of n ∈ N by ν(n). For example, ν(40) = 3 and ν(2n +1) = 0 for all n ∈ N. We denote the binary length of any n ∈ N by λ(n) = log 2 n + 1, e.g. λ(41) = 6.
Deciding whether a natural number n is a Proth number can be done efficiently.
The inequality above follows immediately from the definition of Proth numbers. We note that there is a similar equivalence that can be stated using λ and ν, i.e. a number n ∈ F if and only if (λ(n) + 1)/2 ≤ ν(n − 1).

Lemma 2.2
For n ≥ 1, Proth numbers can be enumerated using a recursive formula: Observe that there can be no other Proth numbers between F n and f since for

Remark 2.3
The formula (λ(F n ) + 1)/2 defines the binary position where F n should be incremented in order to get the next Proth number. For example, if F 8 = 41 = (101001) 2 then we should increment the 4th position (numbering from the right and starting with 1) resulting in (110001) 2 = 49 = F 9 .

Corollary 2.4
The difference of two consecutive Proth numbers F n , F n+1 is always a power of two with exponent (λ(F n ) + 1)/2 .

Lemma 2.6
For n ≥ 2 the previous Proth number can also be obtained by Proof It is easily seen that for n ≥ 2 the equation holds, by which the lemma follows.

Theorem 2.8
The nth Proth number F n can be computed by the closed formula: Proof We prove by induction. For n = 1 we have that L = 0 and F 1 = 3. For n = 2 we have that L = 1, F 2 = 5. For n = 3 we have that L = 1 and F 3 = 9. For n = 4 we have L = 2 and F 4 = 13. Now suppose that the formula (2.1) holds for F n where L = λ(n) − 1. There are two cases to examine: L = λ(n + 1) − 1 = L, and L = L + 1. In the first case, by applying Lemma 2.2 and the induction hypothesis we have that Corollary 2.9 Using Theorem 2.8 we have F 2 n −1 = 2 2n−1 + 1 and F 3·2 n = (2 n + 1) · 2 n+2 + 1.
Let us denote the number of all Proth numbers up to n by π F (n).

Theorem 2.10
Proof By Corollary 2.9 there are 2 m − 1 Proth numbers up to 2 2m−1 + 1, so we have 2 m −2 Proth numbers up to 2 2m−1 . For odd m one can write Proth numbers up to 2 2m−1 . After substituting 2m − 1 by n the first part of the lemma follows.

Lemma 3.1 A Proth number F n is a perfect square if and only if n is a number of the
Proof For odd c, s ∈ N the number (c · 2 m ± s) 2 can be a Proth number if and only if c = s = 1. Hence, exactly the squares (2 m ± 1) 2 are Proth numbers.

Lemma 3.2
There is at least one and at most two Proth numbers between any consecutive squares n 2 and (n + 1) 2 .
Proof Clearly, based on Lemma 3.1, consecutive squares cannot be both Proth numbers. If n 2 = F m − 1 for some m then n 2 + 1 is a Proth number. Otherwise, let us consider the binary representation of the least significant λ(n) bits of n 2 , and let us denote the two-complement 1 of it plus one by x. Then n 2 + x is the next Proth number, where x ≤ 2n. By Lemma 2.2 more than two Proth numbers cannot exist between two consecutive squares n 2 and (n + 1) 2 since the distance between them is exactly 2n + 1. Forming the two-complement plus one (this operation is equal to inverting the bits and adding two) the last 11 bits we have x = (10100101000) 2 . Finally, n 2 + x = (1111100101100000000001) 2 = 4085761 = F 3018 .

Remark 3.4
There exist consecutive Proth numbers so that none of them are perfect squares, and there is not any square between them. The first example is 441 = 21 2 < 449 = F 29 < F 30 = 481 < 22 2 = 484.
Let us define the sequence where π F (n) is the number of all Proth numbers up to n.

Lemma 3.5
The sequence a n is divergent.
Proof From Theorem 2.10 the two subsequences of a n have different limit, namely

Sums of reciprocals
We prove Theorem 1.1 with two lemmas.

Lemma 5.1 ω F < log 3.
Proof Starting with the geometric series From Corollary (2.9), for any k > 10 we have

Lemma 5.2 ω F can be calculated by
Proof By Lemma 2.2 we can enumerate the Proth numbers between F 3·2 i−1 and F 3·2 i −1 by we get that

Applying (5.3) again we have that
and Taking the limit N → ∞ the lemma follows.
We call ω F the Proth constant of the first kind.

Lemma 5.3 Computing ω F numerically can be done with linear order of convergence.
Proof We compute the approximated computational order of convergence for the sequence

(5.4)
Let δ = 0.1. After n ≥ 10 iterations therefore we have a linear order of convergence.

Corollary 5.4
Let n ∈ N be given, and let M = 3(2 n − 1) + 2. Then can be computed in an efficient way using (5.4).
Recall that the Euler-Mascheroni constant [15] γ is defined by There is a well-known connection between γ and the digamma function. For halfinteger arguments the function takes the values:

Theorem 5.5 ω F can also be expressed including the Euler-Mascheroni constant in the following way:
where M = 2 N +1 − 2. Applying (5.3) the above equation can be rewritten to the theorem follows. We call ω R the Proth constant of the second kind. A simple consequence of Theorem 1.1 is that ω R < ω F < log 3. But can we give a sharper estimate for ω R ? Calculating the Proth primes numerically up to 2 72 and using Theorem 1.1 we show in the next Section that ω R < 3 4 .

Numerical results
All formulae presented in the previous section were implemented in PARI/GP 2.11.3 using the GMP-6.2.0 arbitrary precision arithmetic library with p = 100 fixed precision. All computations we present in this section were performed on a single laptop equipped with a 2.90 GHz Intel Core i7-3520M Ivy Bridge processor with 16 GB RAM. All computations shown below finished within a few hours in our test environment.

Number of Proth primes up to 2 72
By the recursive formula of Lemma 2.2 one can enumerate the Proth numbers efficiently. We have computed all the Proth numbers up to 2 72 . We note that Corollary 2.9 can be used to calculate directly the number of Proth numbers up to 2 n , however, we wanted to calculate explicitly all the Proth numbers in order to do a primality test. Applying the Baillie-PSW primality test to all Proth numbers there are exactly 4304683178 Proth primes up to 2 72 which requires 95.8Gb space to store without compression 2 . The number of Proth numbers (π F ), Proth primes (π R ), and primes (π P ) can be seen in Table 1.

Calculating ! F
Using the naive method we calculated ω F for the first M = 3(2 30 − 1) + 2 = 3221225471 Proth numbers. Calculating the number took 44 min 39 s in our test environment. This can be done in a more efficient way using (5.4). For M = 3(2 n − 1) + 2 we have Calculating A n for n = 30 we got the same result as in (6.1) after 3 ms. The analytic method is significantly faster than the naive method. For A n the order of convergence is linear, and using Lemma (5.3) one can calculate ω F with given precision. The first 50 exact decimal digits of ω F are The significance of A n is that n = log 2 ((M − 2)/3 + 1), therefore one can calculate the reciprocal sum of the first M Proth numbers for very large M. Calculating ω F ≈ 3·2 100 i=1 1 F i would take approximately 2.964 · 10 17 years in our test environment using a naive approach. Using the closed formula A n it takes only 7 ms to calculate the reciprocal sum of the first M = 3(2 100 − 1) + 2 = 3802951800684688204490109616127 Proth numbers.

Calculating ! R
We have explicitly calculated the reciprocal sum of the Proth primes up to 2 72 , which yields a lower bound for ω R . Then, using Theorem 1.1, we obtained a very precise upper bound for ω R .
Theorem 6.1 ω R < 3 4 . Proof One can split the main sum of ω F into a finite and an infinite sum, i.e.
Let M be the number of Proth primes up to F 2 N −1 , namely M = π R (F 2 N −1 ). Then ω R can be approximated by a finite reciprocal sum of Proth primes and an infinite sum reciprocal of Proth numbers: Clearly, if M → ∞ the error of the approximation is decreasing, i.e.
In the above inequality the infinite sum can be replaced by a finite one: Putting all of this together we have Let N = 12, hence F 2 N −1 = F 4095 = 8388609. There are 610 Proth primes up to which yields ω R = 0.747392479 . . . and we have nine digits decimal precision.

Disproof of two conjectures of Zhi-Wei Sun
Zhi-Wei Sun in 2012 introduced three conjectures regarding the distribution of Proth primes [16]:

Conjecture 3
The sequence n+1 √ S R (n + 1)/ n √ S R (n) is strictly increasing with limit 1 for all n > 34.
Sun verified the conjectures up to a certain limit but did not find any counterexamples. We disprove Conjectures 1 and 2 by presenting explicit counterexamples. By the proposed methods we were able to compute these values in significantly larger ranges.
Firoozbakht's conjecture states that for every n > 1, n √ P n > n+1 √ P n+1 . The first Sun conjecture is analogous to Firoozbakht's conjecture among Proth numbers. We checked n √ R n > n+1 √ R n+1 for all Proth primes up to 2 72 and found 20 counterexamples. These counterexamples can be seen in Table 2. The ratio (R n+1 − R n )/R n does not appear to be approaching any particular limit which suggests that Conjecture 1 fails infinitely often. Conjecture 2 fails 676169631 times up to 2 72 . The first counterexample for n > 50 occurs for R 9716 . The sum of the first 9716 Proth primes is 13757877741982. R 9716 = 4247584769 and one can easily check that 13757877741982 > (9716 · 4247584769)/3. We note that our computations did not provide any counterexamples for Conjecture 3. Based on the numerical evidence we strongly believe that this conjecture is in fact true.
Funding Open access funding provided by Eötvös Loránd University.
Data Statement Data sharing not applicable to this article as no datasets were generated or analysed during the current study.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.