1 Introduction

A Proth number is a natural number of the form

$$\begin{aligned} k \cdot 2^s+1, \end{aligned}$$

where \(k,s\in {\mathbb {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 \({\mathbb {N}}\). Let us denote the set of Proth numbers by \({\mathcal {F}}\) in honour of François Proth, who introduced these numbers in his 1878 paper [1], the set of primes by \({\mathcal {P}}\) and the Proth primes by \({\mathcal {R}}={\mathcal {F}} \cap {\mathcal {P}}\). We consider \({\mathcal {F}}\) and \({\mathcal {R}}\) as well-ordered sets, and we denote the \(n^{th}\) Proth number and the \(n^{th}\) Proth prime by \(F_n \in {\mathcal {F}}\) and \(R_n \in {\mathcal {R}}\), respectively. The first few Proth primes are

$$\begin{aligned} {\mathcal {R}}=\{3, 5, 13, 17, 41, 97, 113, 193, 241, 257, \ldots \}. \end{aligned}$$

The largest known element in \({\mathcal {R}}\) is

$$\begin{aligned}10223\cdot 2^{31172165} + 1,\end{aligned}$$

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\cdot 2^s+1\) is composite for all natural numbers s. In 1960 Sierpiński [3] showed that there are infinitely many such \(k\in {\mathbb {N}}\) without giving an explicit example. In 1962 Selfridge showed that all numbers of the form \(78557\cdot 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\cdot 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 \cdot 2^s+1\) without the \(k < 2^s\) restriction. It was shown that odd integers k such that \(k \cdot 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\in {\mathcal {P}}\)). Applying the \(k < 2^s\) restriction it is still unknown whether there are infinitely many primes of the form \(k \cdot 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 \cdot 2^s+1\) with \(k<2^{s+\epsilon }\). Without the additional \(\epsilon \) 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< \sum \frac{1}{{\mathcal {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,\ldots \)}, 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< \sum _{q \in 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

$$\begin{aligned} \omega _{\mathcal {F}} = \sum _{i=1}^{\infty } \frac{1}{F_i}= \frac{1}{3}+\frac{1}{5}+\frac{1}{9}+\frac{1}{13}+ \cdots \, , \end{aligned}$$

and the sum of the reciprocals of the Proth primes by

$$\begin{aligned} \omega _{\mathcal {R}} = \sum _{i=1}^{\infty } \frac{1}{R_i}= \frac{1}{3}+\frac{1}{5}+\frac{1}{13}+\frac{1}{17}+ \cdots \, . \end{aligned}$$

In this paper we show that \(0.7473924793<\omega _{\mathcal {R}} < 0.7473924795 \). We were able to achieve this result by (1) enumerating \({\mathcal {F}}\) using an efficient method and (2) finding a tight analytic expression for \(\omega _{\mathcal {F}}\), namely

Theorem 1.1

\(\omega _{\mathcal {F}}<\log {3}\) and

$$\begin{aligned} \omega _{\mathcal {F}} = \frac{1}{3}+\sum _{i=1}^{\infty } 2^{-i-1}\Big (\Psi (2^{i+1}+2^{-i-1})-\Psi (2^{i-1}+2^{-i-1})\Big ), \end{aligned}$$

where \(\Psi \) is the digamma function, i.e.

$$\begin{aligned} { \Psi (x)={\frac{d}{dx}}\log {\big (}\Gamma (x){\big )}={\frac{\Gamma '(x)}{\Gamma (x)}}\, .} \end{aligned}$$

We show that \(\omega _{\mathcal {F}}\) can be calculated with linear order of convergence. To the best of our knowledge \(\omega _{\mathcal {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 \(\Psi \) 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.

2 On Proth numbers

For \(n\in {\mathbb {N}}\) we often use the canonical binary expansion (base-2 representation) of n. For example, \(41=(101001)_2\in {\mathcal {F}}\). Let us denote the number of the trailing zeroes of the binary representation of \(n\in {\mathbb {N}}\) by \(\nu (n)\). For example, \(\nu (40)=3\) and \(\nu (2n+1)=0\) for all \(n\in {\mathbb {N}}\). We denote the binary length of any \(n\in {\mathbb {N}}\) by \(\lambda (n)=\lfloor \log _2{n}\rfloor +1\), e.g. \(\lambda (41)=6\).

Deciding whether a natural number n is a Proth number can be done efficiently.

Lemma 2.1

Let \(3\le n \in {\mathbb {N}}\). Then \(n \in {\mathcal {F}}\) if and only if

$$\begin{aligned} \bigg (\frac{n-1}{2^{\nu (n-1)}}\bigg )^2<n. \end{aligned}$$

The inequality above follows immediately from the definition of Proth numbers. We note that there is a similar equivalence that can be stated using \(\lambda \) and \(\nu \), i.e. a number \(n \in {\mathcal {F}}\) if and only if \(\lfloor (\lambda (n)+1)/2\rfloor \le \nu (n-1)\).

Lemma 2.2

For \(n\ge 1\), Proth numbers can be enumerated using a recursive formula:

$$\begin{aligned} F_{n+1} = F_n + 2^{\lfloor (\lambda (F_n)+1)/2\rfloor },\ F_1=3. \end{aligned}$$

Proof

By Lemma 2.1 we have that \(f=F_n + 2^{\lfloor (\lambda (F_n)+1)/2\rfloor }\in {\mathcal {F}}\) holds exactly if \(F_n \in {\mathcal {F}}\). Observe that there can be no other Proth numbers between \(F_n\) and f since for all integers \(g \in (F_n,f)\) we have \(\lfloor (\lambda (g)+1)/2\rfloor > \nu (g-1)\). Therefore \(F_{n+1}=f\). \(\square \)

Remark 2.3

The formula \({\lfloor (\lambda (F_n)+1)/2\rfloor }\) 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 \(\lfloor (\lambda (F_n)+1)/2\rfloor \).

Corollary 2.5

The ratio sequence of consecutive Proth numbers converges,

$$\begin{aligned} \lim _{n\rightarrow \infty }\frac{F_{n+1}}{F_n}=\lim _{n\rightarrow \infty }\Big (1+\frac{2^{\lfloor (\lfloor \log _2{F_n}\rfloor +2)/2\rfloor }}{F_n}\Big )=1\,. \end{aligned}$$

Lemma 2.6

For \(n\ge 2\) the previous Proth number can also be obtained by

$$\begin{aligned} F_{n-1} = F_n - 2^{\lfloor (\lambda (F_n-2)+1)/2\rfloor }\, . \end{aligned}$$

Proof

It is easily seen that for \(n\ge 2\) the equation

$$\begin{aligned}{\lfloor (\lambda (F_n-2)+1)/2\rfloor }={\lfloor (\lambda (F_{n-1})+1)/2\rfloor }\end{aligned}$$

holds, by which the lemma follows. \(\square \)

Corollary 2.7

Proth numbers \(F_n\) have the form \(4k+1\) if \(n\ge 2\), \(8k+1\) if \(n\ge 5\), and in general, \(2^s\cdot k+1 \) if \(n\ge 3\cdot 2^{s-2}-1\) \((s\ge 2)\).

Theorem 2.8

The n th Proth number \(F_n\) can be computed by the closed formula:

$$\begin{aligned} F_n= \left\{ \begin{array}{ll} (n-2^{L}+1)\cdot 2^{L+1}+1 &{}\, \text{ if } n \ge 3\cdot 2^{L-1}-1, \\ (n-2^{L-1}+1)\cdot 2^{L}+1 &{}\, \text{ else } \end{array} \right. \end{aligned}$$
(2.1)

where \(L=\lambda (n)-1\).

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=\lambda (n)-1\). There are two cases to examine: \(L'=\lambda (n+1)-1=L\), and \(L'=L+1\). In the first case, by applying Lemma 2.2 and the induction hypothesis we have that

$$\begin{aligned} F_n + 2^{\kappa } = (n+2-2^{\kappa -1})2^{\kappa }+1=F_{n+1}\, , \end{aligned}$$

where \(\kappa =L\) if \(n+1<3\cdot 2^{L-1}\) and \(\kappa =L+1\) if \(n+1\ge 3\cdot 2^{L-1}\). If \(L'=L+1\) then \(n+1=2^{L+1}\), and

$$\begin{aligned}&F_n + 2^{L} = (2^{L}+1)2^{L+1}+1 = (n+2-2^L)2^{L+1}+1\\&\qquad \quad =(n+2-2^{L'-1})2^{L'}+1=F_{n+1}\, . \end{aligned}$$

\(\square \)

Corollary 2.9

Using Theorem 2.8 we have \(F_{2^n-1}=2^{2n-1}+1\) and \(F_{3\cdot 2^n}=(2^n+1) \cdot 2^{n+2}+1 \).

Let us denote the number of all Proth numbers up to n by \(\pi _{{\mathcal {F}}}(n)\).

Theorem 2.10

$$\begin{aligned} \pi _{{\mathcal {F}}}(2^n)= \left\{ \begin{array}{ll} \sqrt{2}\cdot \sqrt{2^n}-2 &{}\, \text{ if } \text{ n } \text{ is } \text{ odd, } \\ \frac{3}{2}\cdot \sqrt{2^n}-2 &{}\, \text{ if } \text{ n } \text{ is } \text{ even }\, . \end{array} \right. \end{aligned}$$

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 \(2^m-2=\sqrt{2^{2m-1}}\cdot \sqrt{2}-2\), so there are \(\sqrt{2^{2m-1}}\cdot \sqrt{2}-2\) Proth numbers up to \(2^{2m-1}\). After substituting \(2m-1\) by n the first part of the lemma follows.

Similarly, there are \(3\cdot 2^m\) Proth numbers up to \((2^m+1) \cdot 2^{m+2}+1\), so we have \(3\cdot 2^m-1\) Proth numbers up to \((2^m+1) \cdot 2^{m+2}\). For even m one can write \(3\cdot 2^m-1=\frac{3}{2}\sqrt{2^{2m+2}}-1\), so there are \(\frac{3}{2}\sqrt{2^{2m+2}}-1\) Proth numbers up to \((2^m+1) \cdot 2^{m+2}\). One can observe that there is only one Proth number between \(2^{2m+2}\) and \(2^{2m+2}+2^{m+2}\), namely \(2^{2m+2}+1\). Removing this Proth number from \(\frac{3}{2}\sqrt{2^{2m+2}}-1\) and substituting \(2m+2\) by n we have \(\frac{3}{2}\sqrt{2^{n}}-2\), and the second part follows. \(\square \)

Corollary 2.11

There are \(2^{\lfloor (n-1)/2\rfloor }\) Proth numbers between \(2^n\) and \(2^{n+1}\).

3 Proth numbers and squares

Lemma 3.1

A Proth number \(F_n\) is a perfect square if and only if n is a number of the form \(3\cdot 2^k\) or \(3\cdot (2^k-1)\).

Proof

For odd \(c,s\in {\mathbb {N}}\) the number \((c\cdot 2^m\pm s)^2\) can be a Proth number if and only if \(c=s=1\). Hence, exactly the squares \((2^m\pm 1)^2\) are Proth numbers. \(\square \)

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 \(\lambda (n)\) bits of \(n^2\), and let us denote the two-complementFootnote 1 of it plus one by x. Then \(n^2+x\) is the next Proth number, where \(x\le 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\). \(\square \)

Example 3.3

Let \(n=2021\). Then \(\lambda (n)=11\), \(n^2=(1111100101001011011001)_2\). 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

$$\begin{aligned} a_n = \frac{\pi _{{\mathcal {F}}}(n)}{\#\{m\in {\mathbb {N}}\ :\ 1\le m^2\le n\}}\, \quad , n\in {\mathbb {N}}\, , \end{aligned}$$

where \(\pi _{{\mathcal {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

$$\begin{aligned} \lim _{n\rightarrow \infty } \Big ( \frac{\sqrt{2}\cdot \sqrt{2^n}-2}{\sqrt{2^n}}\Big )=\sqrt{2}\, , \end{aligned}$$

and

$$\begin{aligned} \lim _{n\rightarrow \infty } \Big ( \frac{3/2\cdot \sqrt{2^n}-2}{\sqrt{2^n}}\Big )=\frac{3}{2}\, . \end{aligned}$$

\(\square \)

4 Sums of Proth numbers

Let us denote the sum of the first n Proth numbers by

$$\begin{aligned} S_{{\mathcal {F}}}(n) = \sum _{k=1}^{n}F_k\, . \end{aligned}$$

Furthermore, let

$$\begin{aligned} C(n)&= 7(2n+3)\, ,\\ D(n)&= 7(n+1)(n+2)\, ,\\ E(n)&= 7n-2\, . \end{aligned}$$

Theorem 4.1

$$\begin{aligned} S_{{\mathcal {F}}}(n) = \big (9\cdot 2^{3\Lambda }-C(n) 2^{2\Lambda }+D(n)2^{\Lambda } + E(n)\big )/7\, , \end{aligned}$$
(4.1)

where

$$\begin{aligned} \Lambda = \left\{ \begin{array}{ll} \lambda (n)-1 &{}\, \text{ if } n \ge 3\cdot 2^{\lambda (n)-2}-1\, , \\ \lambda (n)-2 &{}\, \text{ otherwise } \text{. } \end{array} \right. \end{aligned}$$

Proof

We prove by induction. For \(n=1\) we have that \(\Lambda =0\) and \(S_{{\mathcal {F}}}(1)=(9-35+42+5)/7=21/7=3\). For \(n=2\) we have that \(\Lambda =1\) and \(S_{{\mathcal {F}}}(2)= 56/7 = 8 = 3 + 5\). For \(n=3\) we have that \(\Lambda =1\) and \(S_{{\mathcal {F}}}(3)= 119/7=17=3+5+9\). For n=4 we have that \(\Lambda =2\) and \(S_{{\mathcal {F}}}(4)= 210/7=30=3+5+9+13\). Now suppose that (4.1) holds for \(5\le n\in {\mathbb {N}}\).

Let \(\Lambda '=\lambda (n+1)-1\). Then, either \(\Lambda '=\Lambda \) or \(\Lambda '=\Lambda +1\). In the first case using Theorem 2.8 we have

$$\begin{aligned} S_{{\mathcal {F}}}(n)+F_{n+1}&= S_{{\mathcal {F}}}(n)+(n+1-2^{\Lambda }+1)\cdot 2^{\Lambda +1}+1\\&= S_{{\mathcal {F}}}(n) + 2(n+2)\cdot 2^{\Lambda }-2\cdot 2^{2\Lambda }+1\\&= \big (9\cdot 2^{3\Lambda }-C(n+1) 2^{2\Lambda }+D(n+1)2^{\Lambda } + E(n+1)\big )/7\\&= S_{{\mathcal {F}}}(n+1)\, . \end{aligned}$$

Regarding the second part observe that \(\Lambda '=\Lambda +1\) occurs exactly when \(n=2^{\Lambda +1}-1\), in which case

$$\begin{aligned} F_{n+1}= (2^{\Lambda }+1)2^{\Lambda +1}+1=(n+1-2^{\Lambda }+1)\cdot 2^{\Lambda +1}+1\, , \end{aligned}$$

and the previous deduction can be applied. \(\square \)

5 Sums of reciprocals

We prove Theorem 1.1 with two lemmas.

Lemma 5.1

\(\omega _{\mathcal {F}}<\log {3}\).

Proof

Starting with the geometric series

$$\begin{aligned} \frac{1}{1-x} = \sum _{n=0}^{\infty } x^n \end{aligned}$$

we have

$$\begin{aligned} \int \frac{1}{1-x} dx = -\log {|1-x|} = \sum _{n=0}^{\infty } \frac{1}{n+1} x^{n+1}\, , \end{aligned}$$
(5.1)

when \(|x|<1\). Applying (5.1) for \(x=2/3\), we have

$$\begin{aligned} \sum _{n=1}^{\infty } \frac{(2/3)^n}{n} = -\log (1-2/3)=\log {3}\, . \end{aligned}$$

From Corollary (2.9), for any \(k>10\) we have

$$\begin{aligned} \sum _{2^k\le i\le 2^{k+1}-1} \frac{1}{F_i}\le \frac{2^k}{2^{ 2k-1}+1}< \frac{1}{2^{k-1}} < \frac{(2/3)^k}{k} , \end{aligned}$$
(5.2)

therefore

$$\begin{aligned} \sum _{i=2^{11}}^{\infty }\frac{1}{F_i}< \sum _{i=11}^{\infty }\frac{1}{2^{i-1}} < \sum _{i=11}^{\infty }\frac{(2/3)^i}{i}\, . \end{aligned}$$

Since

$$\begin{aligned} \sum _{i=1}^{2^{11}-1}\frac{1}{F_i} < \sum _{i=1}^{10}\frac{(2/3)^i}{i} \end{aligned}$$

we can conclude that

$$\begin{aligned} \omega _{\mathcal {F}}=\sum _{i=1}^{\infty }\frac{1}{F_i} < \sum _{i=1}^{\infty }\frac{(2/3)^i}{i} =\log { 3}\, . \end{aligned}$$

\(\square \)

Lemma 5.2

\(\omega _{\mathcal {F}}\) can be calculated by

$$\begin{aligned} \omega _{\mathcal {F}} = \frac{1}{3}+\sum _{i=1}^{\infty } 2^{-i-1}\Big (\Psi (2^{i+1}+2^{-i-1})-\Psi (2^{i-1}+2^{-i-1})\Big ). \end{aligned}$$

Proof

By Lemma 2.2 we can enumerate the Proth numbers between \(F_{3\cdot 2^{i-1}}\) and \(F_{3\cdot 2^{i}-1}\) by \((2^i+1)^2+k\cdot 2^{i+1}\), where \(k=0,1,\ldots ,3\cdot 2^{i-1}-1\). Clearly,

$$\begin{aligned}\sum _{i=1}^{M}\frac{1}{F_i} = \frac{1}{3}+\frac{1}{5}+\sum _{i=1}^{N} \sum _{k=0}^{3\,{2}^{i-1}-1} \frac{1}{\left( {2}^{i}+1 \right) ^{2}+k\cdot {2 }^{i+1}}\, , \end{aligned}$$

where \(M=3(2^N-1)+2\). Applying the identity

$$\begin{aligned} \Psi (z+n)=\frac{1}{z} + \frac{1}{z+1}+\cdots + \frac{1}{z+n-1} + \Psi (z) \end{aligned}$$
(5.3)

we get that

$$\begin{aligned} \sum _{k=0}^{3\,{2}^{i-1}-1} \frac{1}{\left( {2}^{i}+1 \right) ^{2}+k\cdot {2 }^{i+1}} = \frac{ \Psi \left( {2}^{i+1}+{2}^{-i-1}+1 \right) -\Psi \left( {2}^{i -1}+{2}^{-i-1}+1 \right) }{{2}^{i+1}}\, . \end{aligned}$$

Applying (5.3) again we have that

$$\begin{aligned} \Psi (2^{i+1}+2^{-i-1}+1) = \frac{1}{2^{i+1} + 2^{-i-1}}+ \Psi (2^{i+1}+2^{-i-1}) \end{aligned}$$

and

$$\begin{aligned} \Psi (2^{i-1}+2^{-i-1}+1) = \frac{1}{2^{i-1} + 2^{-i-1}}+ \Psi (2^{i-1}+2^{-i-1}) \, . \end{aligned}$$

Since

$$\begin{aligned}&\sum _{i=1}^N 2^{-i-1}\bigg (\frac{1}{2^{i+1} + 2^{-i-1}} - \frac{1}{2^{i-1} + 2^{-i-1}}\bigg ) \\&= \sum _{i=1}^N \bigg ( \frac{1}{1+2^{2(i+1)}} - \frac{1}{1+2^{2i}}\bigg ) =\frac{1}{1+2^{2N+2}}-\frac{1}{5} \end{aligned}$$

we have

$$\begin{aligned}&\sum _{i=1}^N {2}^{-i-1}\left( \Psi \left( {2}^{i+1}+1+{2}^{-i-1} \right) - \Psi \left( {2}^{i-1}+1+{2}^{-i-1} \right) \right) \\&= \left( {2}^{2N+2}+1 \right) ^{-1}-1/5+\sum _{i=1}^{N}{2}^{-i-1}\left( \Psi \left( {2}^{i+1}+{2}^{-i-1} \right) - \Psi \left( {2}^{i-1}+{2}^{-i-1} \right) \right) \, . \end{aligned}$$

Taking the limit \(N\rightarrow \infty \) the lemma follows. \(\square \)

We call \(\omega _{\mathcal {F}}\) the Proth constant of the first kind.

Lemma 5.3

Computing \(\omega _{\mathcal {F}}\) numerically can be done with linear order of convergence.

Proof

We compute the approximated computational order of convergence for the sequence

$$\begin{aligned} A_n = 1/3 + \left( {2}^{2n+2}+1 \right) ^{-1} + \sum _{i=1}^{n} 2^{-i-1}\big (\Psi (2^{i+1}+2^{-i-1})-\Psi (2^{i-1}+2^{-i-1})\big )\, . \; \nonumber \\ \end{aligned}$$
(5.4)

Let \(\delta = 0.1\). After \(n\ge 10\) iterations

$$\begin{aligned} \bigg |\log _2\big |\frac{A_{n+1}-A_n}{A_n-A_{n-1}}\big | \ \big /\ {\log _2\big |\frac{A_{n}-A_{n-1}}{A_{n-1}-A_{n-2}}\big |} -1\bigg | < 1/n + \delta \, , \end{aligned}$$

therefore we have a linear order of convergence. \(\square \)

Corollary 5.4

Let \(n\in {\mathbb {N}}\) be given, and let \(M=3(2^n-1)+2\). Then

$$\begin{aligned} A_n = \sum _{i=1}^M \frac{1}{F_i} \end{aligned}$$

can be computed in an efficient way using (5.4).

Recall that the Euler–Mascheroni constant [15] \(\gamma \) is defined by

$$\begin{aligned} \gamma = \lim _{n\rightarrow \infty } \big (\sum _{i=1}^n \frac{1}{i}-\log {n} \big )\, . \end{aligned}$$

There is a well-known connection between \(\gamma \) and the digamma function. For half-integer arguments the \(\Psi \) function takes the values:

$$\begin{aligned} \Psi (n+\frac{1}{2})=-\gamma -2\log {2}+\sum _{i=1}^n \frac{2}{2i-1}\, . \end{aligned}$$
(5.5)

Theorem 5.5

\(\omega _{\mathcal {F}}\) can also be expressed including the Euler–Mascheroni constant in the following way:

$$\begin{aligned} \omega _{\mathcal {F}} = \frac{\gamma }{2}-1+\log {2}+\frac{1}{2} \sum _{i=1}^{\infty } \big (2^{1-i}\Psi (2^i+2^{-i})-2^{-i}\Psi (2^{-1+i}+2^{-1-i})\big )\, . \end{aligned}$$
(5.6)

Proof

We can write

$$\begin{aligned} \sum _{i=1}^{M}\frac{1}{F_i} = \sum _{i=1}^{N}\bigg ( \sum _{k=0}^{{2}^{i-1}-1} \frac{1}{{2}^{2i-1}+1+k\, 2^{i}} + \frac{1}{2({2}^{2i-1}+1+k\, 2^{i})-1}\bigg )\, , \end{aligned}$$

where \(M=2^{N+1}-2\). Applying (5.3) the above equation can be rewritten to

$$\begin{aligned} \sum _{i=1}^{N}\bigg ( \frac{\Psi (2^i+2^{-i})}{2^{i}}-\frac{\Psi (2^{i-1}+2^{-i})}{2^{i}}+ \frac{\Psi (2^i+2^{-i-1})}{2^{i+1}}-\frac{\Psi (2^{i-1}+2^{-i-1})}{2^{i+1}} \bigg )\, . \end{aligned}$$

Since

$$\begin{aligned}&\sum _{i=1}^{N}\bigg ( {2}^{-i-1}\Psi \left( {2}^{i}+{2}^{-i-1} \right) -{2}^{-i}\Psi \left( {2}^{i-1}+{2}^{-i} \right) \bigg )\\&\qquad =2^{-N-1}\Psi (2^N+2^{-N-1}) - 2^{-1}\Psi (1+2^{-1})\\&\qquad =2^{-N-1}\Psi (2^N+2^{-N-1})-1+\frac{1}{2}\gamma +\log {2} \end{aligned}$$

after taking the limit \(N\rightarrow \infty \) for

$$\begin{aligned}&\sum _{i=1}^{N} \big ( 2^{-i}\Psi (2^i+2^{-i})-2^{-i-1}\Psi (2^{i-1}+2^{-i-1})\big )\\&+ 2^{-N-1}\Psi (2^N+2^{-N-1})-1+\frac{1}{2}\gamma +\log {2} \end{aligned}$$

the theorem follows. \(\square \)

Corollary 5.6

From equation (5.6) the Euler–Mascheroni constant can be expressed with the help of the Proth constant of the first kind.

We call \(\omega _{\mathcal {R}}\) the Proth constant of the second kind. A simple consequence of Theorem 1.1 is that \(\omega _{\mathcal {R}}<\omega _{\mathcal {F}}<\log {3}\). But can we give a sharper estimate for \(\omega _{\mathcal {R}}\)? Calculating the Proth primes numerically up to \(2^{72}\) and using Theorem 1.1 we show in the next Section that \(\omega _{\mathcal {R}}<\frac{3}{4}\).

6 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.

6.1 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 compressionFootnote 2. The number of Proth numbers (\(\pi _{\mathcal {F}}\)), Proth primes (\(\pi _{\mathcal {R}}\)), and primes (\(\pi _{\mathcal {P}}\)) can be seen in Table 1.

Table 1 Proth primes up to \(2^{72}\)

6.2 Calculating \(\omega _{\mathcal {F}}\)

Using the naive method we calculated \(\omega _{\mathcal {F}}\) for the first \(M=3(2^{30}-1)+2=3221225471\) Proth numbers. Calculating the number

$$\begin{aligned} \omega _{\mathcal {F}}\approx \sum _{i=1}^{M} \frac{1}{F_i} = 1.093322455790288912266607736660468936405362859335 \end{aligned}$$
(6.1)

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

$$\begin{aligned}&A_n = \sum _{i=1}^M \frac{1}{F_i} = 1/3 + \left( {2}^{2n+2}+1 \right) ^{-1}\\&\qquad \qquad \qquad \quad + \sum _{i=1}^{n} 2^{-i-1}\big (\Psi (2^{i+1}+2^{-i-1})-\Psi (2^{i-1}+2^{-i-1})\big )\, . \end{aligned}$$

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 \(\omega _{\mathcal {F}}\) with given precision. The first 50 exact decimal digits of \(\omega _{\mathcal {F}}\) are

$$\begin{aligned} \omega _{\mathcal {F}}=\sum _{i=1}^{\infty } \frac{1}{F_i} \approx 1.09332245643583252894473574405304699874426408312553 \ldots \end{aligned}$$

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 \(\omega _{\mathcal {F}}\approx \sum _{i=1}^{3\cdot 2^{100}} \frac{1}{F_i}\) would take approximately \(2.964\cdot 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.

6.3 Calculating \(\omega _{\mathcal {R}}\)

We have explicitly calculated the reciprocal sum of the Proth primes up to \(2^{72}\), which yields a lower bound for \(\omega _{\mathcal {R}}\). Then, using Theorem 1.1, we obtained a very precise upper bound for \(\omega _{\mathcal {R}}\).

Theorem 6.1

\(\omega _{\mathcal {R}}<\frac{3}{4}\).

Proof

One can split the main sum of \(\omega _{\mathcal {F}}\) into a finite and an infinite sum, i.e.

$$\begin{aligned} \omega _{\mathcal {F}}=\sum _{i=1}^{2^N-1} \frac{1}{F_i} + \sum _{i=2^N}^{\infty } \frac{1}{F_i}\, . \end{aligned}$$

Let M be the number of Proth primes up to \(F_{2^N-1}\), namely \(M=\pi _{\mathcal {R}}(F_{2^N-1})\). Then \(\omega _{\mathcal {R}}\) can be approximated by a finite reciprocal sum of Proth primes and an infinite sum reciprocal of Proth numbers:

$$\begin{aligned} \omega _{\mathcal {R}}\approx \sum _{i=1}^{M} \frac{1}{R_i} + \sum _{i=2^N}^{\infty } \frac{1}{F_i}\, . \end{aligned}$$

Clearly, if \(M\rightarrow \infty \) the error of the approximation is decreasing, i.e.

$$\begin{aligned} \omega _{\mathcal {R}}= \lim _{M\rightarrow \infty }\Big ( \sum _{i=1}^{M} \frac{1}{R_i} + \sum _{i=2^N}^{\infty } \frac{1}{F_i}\Big )\, . \end{aligned}$$

Hence,

$$\begin{aligned} \sum _{i=1}^{M} \frac{1}{R_i}< \omega _{\mathcal {R}} < \sum _{i=1}^{M} \frac{1}{R_i} + \sum _{i=2^N}^{\infty } \frac{1}{F_i}\, . \end{aligned}$$

By Theorem 1.1 we have

$$\begin{aligned} \sum _{i=2^{N}}^{\infty }\frac{1}{F_i} < \sum _{i=N}^{\infty }\frac{(2/3)^i}{i}\, , \end{aligned}$$

therefore

$$\begin{aligned} \sum _{i=1}^{M} \frac{1}{R_i}< \omega _{\mathcal {R}} < \Big (\sum _{i=1}^{M} \frac{1}{R_i} + \sum _{i=N}^{\infty }\frac{(2/3)^i}{i}\Big )\, . \end{aligned}$$

In the above inequality the infinite sum can be replaced by a finite one:

$$\begin{aligned} \sum _{i=N}^{\infty }\frac{(2/3)^i}{i}= \log {3}- \sum _{i=1}^{N-1}\frac{(2/3)^i}{i}\, . \end{aligned}$$

Putting all of this together we have

$$\begin{aligned} \sum _{i=1}^{M} \frac{1}{R_i}< \omega _{\mathcal {R}} < \Big (\sum _{i=1}^{M} \frac{1}{R_i} + \log {3}- \sum _{i=1}^{N-1}\frac{(2/3)^i}{i} \Big )\, . \end{aligned}$$

Let \(N=12\), hence \( F_{2^N-1}=F_{4095}=8388609\). There are 610 Proth primes up to \(F_{2^N-1}\), so \(M=\pi _{\mathcal {R}}(F_{4095})=610\). Then we have

$$\begin{aligned} \sum _{i=1}^{610} \frac{1}{R_i}< \omega _{\mathcal {R}} < \Big (\sum _{i=1}^{610} \frac{1}{R_i} + \log {3}- \sum _{i=1}^{11}\frac{(2/3)^i}{i} \Big )\, . \end{aligned}$$

Since

$$\begin{aligned} \sum _{i=1}^{610} \frac{1}{R_i} \approx 0.7473361 \end{aligned}$$

and

$$\begin{aligned} \sum _{i=12}^{\infty }\frac{(2/3)^i}{i}=\log {3}- \sum _{i=1}^{11}\frac{(2/3)^i}{i} \approx 0.001692 \end{aligned}$$
(6.2)

we have

$$\begin{aligned} 0.7473361< \omega _{\mathcal {R}} < 0.7490281\, . \end{aligned}$$

\(\square \)

The upper bound in (6.2) starting with “0.00" implies that our estimate is precise for at least two decimal digits, so we have \(\omega _{\mathcal {R}}\approx 0.74\ldots \). We note that calculating Proth primes up to \(F_{2^{12}-1}=8388609\) can be done within a few milliseconds in our test environment. However, one can calculate \(\omega _{\mathcal {R}}\) with higher precision using more Proth primes.

Theorem 6.2

\(0.7473924793< \omega _{\mathcal {R}} < 0.7473924795\)

Proof

Let \(N=36\). Then \(F_{2^N-1}=2361183241434822606849\) and \(M=\pi _{\mathcal {R}}(F_{2^N-1})\) \(=2919190355\).

$$\begin{aligned} \sum _{i=1}^{M} \frac{1}{R_i} \approx 0.74739247939468214088150153108165548706991 \end{aligned}$$

One can use (5.2) from Theorem 1.1 to get

$$\begin{aligned} \sum _{i=2^{N}}^{\infty }\frac{1}{F_i} < \sum _{i=N}^{\infty }\frac{1}{2^{i-1}}\, , \end{aligned}$$

so we have

$$\begin{aligned} \sum _{i=1}^{M} \frac{1}{R_i}< \omega _{\mathcal {R}} < \Big (\sum _{i=1}^{M} \frac{1}{R_i} + \sum _{i=N}^{\infty }\frac{1}{2^{i-1}} \Big )\, . \end{aligned}$$

Since

$$\begin{aligned} \sum _{i=N}^{\infty }\frac{1}{2^{i-1}} =2-\sum _{i=1}^{N-1}\frac{1}{2^{i-1}} =\frac{1}{17179869184} \end{aligned}$$

therefore

$$\begin{aligned} \sum _{i=1}^{M} \frac{1}{R_i}< \omega _{\mathcal {R}} < \sum _{i=1}^{M} \frac{1}{R_i} +\frac{1}{17179869184}\, , \end{aligned}$$

which yields \(\omega _{\mathcal {R}} = 0.747392479\ldots \) and we have nine digits decimal precision. \(\square \)

6.4 Disproof of two conjectures of Zhi-Wei Sun

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

Table 2 The first 20 counterexamples for Sun’s I. conjecture

Conjecture 1 For every \(n>5\), \(R_{n+1}< R_n^{1+1/n}\) i.e. \(\root n \of {R_n} > \root n+1 \of {R_{n+1}}\).

Conjecture 2 Set \(S_{{\mathcal {R}}}(n)= \sum _{i=1}^{n} R_i\), then \(S_{\mathcal R}(n)< n \cdot R_n/3\) for all \(n>50\).

Conjecture 3 The sequence \(\root n+1 \of {S_{{\mathcal {R}}}(n+1)}/\root n \of {S_{\mathcal 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\), \(\root n \of {P_n} > \root n+1 \of {P_{n+1}}\). The first Sun conjecture is analogous to Firoozbakht’s conjecture among Proth numbers. We checked \(\root n \of {R_n} > \root n+1 \of {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\cdot 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.