The Number of Primes

Abstract

It is known that the prime-number-formula at any distance from the origin has a systematic error. It is shown that this error is proportional to the square of the number of primes present up to the square root of the distance. The proposed completion of the prime-number-formula in the present paper eliminates this systematic error. This is achieved by using a quickly converging recursive formula. The remaining error is reduced to a symmetric dispersion of the effective number of primes around the completed prime-number-formula. The standard deviation of the symmetric dispersion at any distance is proportional to the number of primes present up to the square root of the distance. Therefore, the absolute value of the dispersion, relative to the number of primes is approaching zero and the number of primes resulting from the prime-number-formula represents the low limit of the number of primes at any distance.

Share and Cite:

Doroszlai, P. and Keller, H. (2022) The Number of Primes. Advances in Pure Mathematics, 12, 81-95. doi: 10.4236/apm.2022.122008.

1. Introduction

Writing the integral of de la Valée Poussin as summing over all integers the local density of primes results in a first approximation for the number of primes. The summing may be written as two steps: First summing up the local density of primes within sections of length ( c ) and then summing up to over all the ( c ) sections. As the first simplification over each section, the average of the local density is taken. A second simplification is taking instead the average of the local density of primes within each section, the density within the last section at the distance (c). This simplification results in the well-proved prime-number-formula. It is shown that the difference between the first simplification and the prime-number-formula is proportional to the square of the number of primes present up to the distance ( c ).

Further, it is shown that the error due to the first simplification is proportional to the number of primes present up to the distance ( c ). This proportionality allows for a correction of the first simplification. In fact, this correction may be applied recursively. Avoiding the second simplification, the resulting formula gives without systematic error the number of primes at the distance (c).

2. Evaluation of the Number of Primes

De la Valée Poussin proved 1899, (ref. [1] ), that ( π ( c ) L i ( c ) ), the integral of the local logarithmic density of free positions ( 1 / ln ( c ) ). Approximating the integral by the sum of the logarithmic density over all integers is in the following named as sum over all integers:

π ( c ) + O ( c ) 2 c 1 ln ( c ) d c ; π a p p r ( c ) n = 2 c 1 ln ( c ) (1.1)

The above sum may be written as summing up first over all integers within the sections of length ( c ) and then summing up to over all the ( c ) sections of the length ( c ). Taking the average value over each section and summing up to over the sections is the first simplification, in the following used as sum over all sections:

π a p p r n = 2 c 1 ln ( c ) = j = 2 c [ n = ( j 1 ) c j c 1 ln ( c ) ] j = 1 c c ln ( j c ) (1.2)

The well proven prime-number-formula PNF results from a second simplification of the above approximation by taking for each of the sections the smallest value of the density at ( j = c ):

j = 1 c c ln ( j c ) > j = 1 c c ln ( c c ) = c ln ( c ) = S ( c ) (1.3)

The difference between the first simplification of the number of primes and the value resulting from the PNF, (refs. [2] [3] ), is proportional to ( R ( c ) 2 = S ( c ) 2 ), the square of the number of primes up to the distance ( c ):

j = 1 c c ln ( j c ) j = 1 c c ln ( c c ) = j = 1 c c ln ( j c ) c ln ( c ) j = 1 c 1 = j = 1 c c ln ( j c ) S ( c ) = γ c R ( c ) 2

because value ( γ c ) quickly converges to a constant value, as shown in Annex A1:

γ c = c ln ( c ) R ( c ) 2 j = 1 c ( ln ( c ) ln ( j c ) c ) = 1 2 R ( c ) j = 1 c ( ln ( c ) ln ( j c ) c ) = 1 R ( c ) j = 1 c ( ln ( c ) ln ( j c ) c 2 ) (1.4)

Thus, the error of the second simplification resultinginthe PNF at the distance (c) is proportional to ( R ( c ) 2 ), the square of the number of primes present at ( c ). The factor of proportionality is evaluated in Annex A1 as ( γ c = 0.2829 ).

The relation between the error of the PNF at (c) and the square of the number of primes up to ( c ) is invariant. The constant factor of proportionality ( γ c ) is an inherent propriety of the number of primes.

The first simplification replacing ( n = ( j 1 ) c j c 1 ln ( n ) ) by ( c ln ( j c ) ) in (1.2) originates an error ( Δ π e r r o r ( c ) ).

It can be proved, that this error is proportional to ( R ( c ) ), the number of the series of multiples of primes, which are covering positions at (c). This is because each of the series of multiples of primes contributes its share to the error:

Δ π e r r o r ( c ) = γ s e c j = 1 c c ln ( j c ) γ s e c c ln ( c c ) j = 1 c 1 γ s e c R ( c ) (1.5)

Herewith the error at the distance (c)—meaning the difference between the effective number of primes ( π ( c ) ) and the value resulting from the first simplification ( π s e c _ a p p r _ ( c ) ), using the average value of the density over the sections in (1.2)—is proportional to the number of primes up to ( c ). The factor of proportionality is evaluated in annex 2.2:

Δ π e r r o r ( c ) = π s e c _ a p p r _ ( c ) π ( c ) = γ s e c R ( c ) ; γ s e c = 0.03551 (1.6)

Because the error of the first simplification resulting from the procedure of taking the average of the number of primes over the sections—evaluated as sum over all sections (1.2)—is proportional to the number of primes present up to the root of the distance, the approximating function (1.2) may be corrected correspondingly. The corrected approximating function, the corrected sum over all sections is instead of (1.2):

π s e c _ a p p r _ c o r r _ ( c ) = π s e c _ a p p r _ ( c ) γ s e c π s e c _ a p p r _ ( c ) = j = 1 c c ln ( j c ) γ s e c j = 1 c c ln ( j c ) (1.7)

But herewith for ( R e f f ( c ) ) and for ( S e f f ( c ) ) it may be written recursively:

π s q r _ s e c _ a p p r _ c o r r _ ( c ) = π s q r _ s e c _ a p p r _ ( c ) γ s e c π s q r _ s e c _ a p p r _ ( c ) = j = 1 c c ln ( j c ) γ s e c j = 1 c c ln ( j c )

π s e c _ a p p r _ c o r r _ ( c ) = π s e c _ a p p r _ ( c ) γ s e c π s e c _ a p p r _ ( c ) = π s e c _ a p p r _ ( c ) γ s e c ( π s q r _ s e c _ a p p r _ ( c ) γ s e c π s q r _ s q r _ s e c _ a p p r _ ( c ) ) = j = 1 c c ln ( j c ) γ s e c j = 1 c c ln ( j c ) + γ s e c 2 j = 1 c c ln ( j c ) + (1.8)

This allows writing for the complete-prime-number-formula (CPNF):

π a p p r _ ( c ) = j = 1 c c ln ( j c ) m = 1 γ s e c m j = 1 c ( 1 2 m + 1 ) c ( 1 2 m + 1 ) ln ( j c ( 1 2 m + 1 ) ) (1.9)

This formula convergevery fast: Two steps with ( m = 2 ) are already sufficient.

The results of the CPNF are evaluated in Annex A3and compared with the effective number of primes. Compared with another approximating formula (refs. [4] [5] ), there is no systematic error. The remaining error is the dispersion around the CPNF. It is proportional to the number of primes up to ( R ( c ) ), the series of multiples that are covering positions at (c). Therefore, the dispersion of the effective number of primes around the CPNF, relative to ( R ( c ) ) has constant boundaries, symmetrical around zero, as demonstrated in AnnexA2 and AnnexA3:

Δ π a p p r _ r e l _ ( c ) = π s e c _ a p p r _ ( c ) π ( c ) R ( c ) ; Δ π s q r _ a p p r _ r e l _ ( c ) = π s q r _ s e c _ a p p r _ ( c ) π ( c ) R ( c ) (1.10)

The standard deviation of the relative dispersion is:

S D Δ π _ a p p r _ r e l _ ( c ) = 1 c c ( π a p p r ( c ) π e f f ( c ) π e f f ( c ) ) 2 (1.11)

It is evaluated in Annex A4. It is found that the standard deviation is constant over the distance. This constant is evaluated in Annex A4as ( F S D _ Δ π = 0.16238 ), it is again an inherent property of the prime numbers.

3. Boundaries of the Dispersion of the Number of Primes around the CPNF

Regarding FigureA3.1, it is obvious, that the dispersion shows oscillations of different frequencies: There are different oscillations with high, middle, and low frequencies observable. The evaluation of the number of primes with the CPNF correct the error of the average on the long range, but at the same time it is the origin of oscillations due to the summation procedures over ( R ( c ) , R ( c ) , R ( c ) , ) subsections. Each time these values change by unity, there is a discontinuity in the summation procedure. At the distance (c), with ( R ( c ) ) being the number of primes present up to ( c ), the summing of the local density values over (j) is influenced only by ( c ). If for the distance succeeding primes were taken, as in the above evaluations, the size of the gaps between primes would account for the long-range fluctuations. If ( R ( c ) ) changes by unity, there is a jump: At the change of the distance at certain number of primes ( P ( n ) ) the summation limit changes

from ( n = R ( c ) , c = P ( n ) ) to ( n = R ( c ) + 1 , c = P ( n + 1 ) ),

from ( c j = 1 R ( c ) 1 ln ( j c ) ) to ( c j = 1 R ( c ) + 1 1 ln ( j c ) ) (2.1)

The difference makes

( c j = 1 R ( c ) + 1 1 ln ( j c ) c j = 1 R ( c ) 1 ln ( j c ) c ln ( c ) = R ( c ) 2 ). (2.2)

For illustration, the discontinuity of the approximating function is evaluated and illustrated in Annex A5.

Thus, the dispersion of the effective number of the primes around the best estimate value—due to the evaluation procedure of the best estimate value—is proportional to the number of primes, the series of multiples of which primes cover positions at the distance (c). Another source of dispersion is the variable gap between the primes. Concerning the complete dispersion, the following lemma may be formulated:

Lemma 2.1:

The boundaries of the dispersion of the number of primes at any distance (c) are proportional to ( R ( c ) ), the number of the series of multiples of primes, which are covering positions at (c).

Proof: The cover interval is defined as the interval of the size ( 2 c ) with centrum at the distance (c). Shifting the centrum of the cover interval to the origin, all the series of multiples of the ( R ( c ) ) primes coincide, and each series covers at least two positions within the cover interval, around the origin. Such a complete coincidence occurs next times at the distance equal to the product of all first ( R ( c ) ) primes.

In the following, only the series of multiples of the primes in the range ( P ( n ) , R ( c ) < n < R ( c ) ) will be taken into consideration. This does not influence the validity of the proof, since for large distances nearly all primes are in this range.

At any distance ( c c ) all of the series of multiples of primes are shifted with reference to (c), except the ones coinciding at (c). All these shifted series liberate by the shifting two positions within the cover interval. The series of multiples of some primes—after the shifting—may cover again two positions, which are liberated by the shifting of the series of multiples of two other primes. This is only possible, if the corresponding prime is—before the shifting—equidistant to two other primes. It can be proved, that the density of the number of such three equidistant primes at the distance (c) is ( δ 2 c ln ( c ) 3 ; δ 2 = 1.320323632 ), thus ( δ 2 ln ( c ) 2 ) times smaller, then the density of primes.

Because of this fact, the effect of the multiple coverage after the shiftingmay be neglected: On the average, each shifted series of multiples of primes liberates two positions within the cover interval and covers only one.

Herewith the shifted series of multiples of the ( R ( c ) R ( c ) ) primes leave on the average ( R ( c ) R ( c ) ) positions free within the cover interval. These free positions are for a large distance about equally distributed between the upper and the lower part of the cover interval. Therefore, within the sections of the length ( c ) at the arbitrary distance (c) there are, on the average

( 1 2 ( R ( c ) R ( c ) ) 1 2 R ( c ) ) positions left free.

Besides the effect of the multiple coverages, there are some other effects, which may be the reason for divergence from the average value ( R ( c ) / 2 ). All the following effects may be neglected:

The effect of multiple coincidences between the series of multiples of primes: The number of coinciding primes ( q = Q ( c ) ) is limited by the fact, that their product must be smaller than the distance (c). The largest number of coincidences occurs, if the first (q) primes are coinciding:

P e r ( q ) = p = 1 q P ( p ) ; Q ( c ) = P e r ( q ) ; P e r ( q ) c < P e r ( q + 1 ) (2.3)

The number ( Q ( c ) ) is growing very slowly with the distance (c). Its effect may be neglected against ( R ( c ) / 2 ), the average value of free positions remaining.

The effect of the shifting outside of the cover interval: Each series of multiples considered may cover two positions within the cover interval after the shifting. By the shifting, the covering capability of some series of multiples of primes may be reduced by shifting outside of the limits of the cover interval one of the covered positions. The number of covered positions within the cover interval may only be reduced by this effect, herewith rising the remaining number of the remaining free positions. The number of the primes, which may participate in this effect is limited, therefore the effect may be neglected against ( 1 2 R ( c ) ), the average value of free positions remaining.

Therefore, the total dispersion is proportional to ( 1 2 R ( c ) ), as stated in the lemma and concluding the proof.

With this lemma the dispersion of the number of primes within each section of the length ( c ) at the distance ( j c ) is certainly smaller than the average number of free positions left ( 1 2 R ( c ) ). Therefore, the difference between the effective value of primes up to this distance ( π ( c ) ) and its approximation ( π a p p r ( c ) ) is limited to the number of the series of multiples of primes, which are covering positions at this distance:

π b o u n d s _ e f f ( c ) = ± c 2 ln ( c ) ;

π b o u n d s ( c ) π b o u n d s ( c ) = π b o u n d s _ a p p r ( c ) + π b o u n d s _ e f f ( c ) = ± c ln ( c ) = ± R ( c ) (2.4)

Lemma 2.1 is in accordance with the fact—demonstrated in (1.11) and in Annex A4—that the standard deviation of the dispersion around the best estimate approximation of the number of primes—resulting from the CPNF, and relative to ( R ( c ) )—is constant over the distance (c). The constancy of the standard deviation of the relative dispersion around the best estimate approximation of the number of primes—resulting from the CPNF—is an inherent property of the prime numbers.

From Lemma 2.1, the boundary of the dispersion of the effective number of primes around the value resulting from its best estimate expression is proportional to the number of primes, which are covering position at any distance from the origin ( K R ( c ) ), with (K) being a constant factor of any size):

lim c π d i s p ( c ) = lim c ( K π b o u n d s _ e f f ( c ) ) = lim c ( K R ( c ) ) = (2.5)

With this boundary growing to infinity, an additional proof for the fact, which the upper limit of the gap between consecutive primes is unlimited, (see ref. [6] ). On the other hand, it follows, that the width of the boundaries of the dispersion of the number of primes, relative to the value resulting from its best estimate expression, is approaching zero with the distance growing without limit:

π d i s p ( c ) π ( c ) = K π b o u n d s _ e f f ( c ) π ( c ) = K R ( c ) S ( c ) : lim c ( K c ln ( c ) c ln ( c ) ) = lim c 2 K c = 0 (2.6)

Therefore, the series of primes approaches a continuum for large distances.

Lemma 2.2:

For any distance from the origin (c) large enough, the difference between the values resulting from the complete-prime-number-formula (CPNF) and from the prime-number-formula (PNF) is larger than the width of the dispersion of the number of primes ( R ( c ) ) multiplied by any constant factor ( K 1 ).

Proof: The difference between the value of the (CPNF) and the (PNF) is with (1.3) growing proportional to ( R ( c ) 2 ), with the factor of proportionality ( γ c ). The width of the dispersion of the number of primes grows with Lemma 2.1 only proportional to ( R ( c ) ).

For any sufficiently large distance ( c l i m i t ( γ c ) < c ) the difference between the value of the (CPNF) and the (PNF) outgrows ( K R ( c ) ) for any (K):

lim c π ( c ) S ( c ) K R ( c ) = γ c K R ( c ) =

asstated in the lemma and concluding the proof.

From this Lemma 2.2 follows, that the PNF is the low limit of the number of primes. Because the number of primes has a low limit function, growing to infinity, it is infinite itself: An additional proof for the infinity of the number of primes.

4. Conclusions

For large distances, the CPNF gives a result for the number of primes as good as de la Valée Poussin’s formula: There is no systematic error involved. The explication for this fact is that de la Valée Poussin’s formula uses the integral of the local density given by the inverse of the logarithm, while Equation (1.0) uses the summation of the same values, applied over the sections of the length ( c ), with recurring correction. This allows to formulate the following lemma:

Lemma 3.1:

The complete-prime-number-formula (CPNF) gives the number of primes with increasing efficiency for all distances from the origin.

Proof: The approximating formula (1.9) is based on the recurring application of the correction of the replacement of the de la Valée Poussin integral:

j = 1 c c ln ( j c ) γ s e c j = 1 c c ln ( j c ) + γ s e c 2 j = 1 c c ln ( j c ) +

For large distances (c) each of the components of the correction goes over into the integral of the inverse of the logarithm of the distance (c):

lim c ( j = 1 c c ln ( j c ) ) = 0 c 1 ln ( c ) d c ; γ s e c j = 1 c c ln ( j c ) = γ s e c 0 c 1 ln ( c ) d c

For the distance (c) growing to infinity, the contribution of the successive components—relative to the effective number of primes approaches zero. The remaining first component results in the de la Valée Poussin integral as stated in the lemma and concluding the proof.

The first evaluation of the factor ( γ c ) in (1.6) and (1.7) is somewhat heuristic since the convergence is not strongly proved. But the application of this factor in the CPNF results in a converging approximation of the effective number of primes. This fact justifies the evaluation procedure of the factor ( γ s e c ) and proves the validity of its value. The evaluation of the factor ( γ s e c ) is repeated in Annex A3 with the results of the CPNF. It gives the exact value.

Annexes

All above formula are checked in the following annexes with numeric results. The annexes together compose executable files in MATHCAD from PTC. The syntax corresponds to the MATHCAD syntax. Especially the symbols ( c e i l ( x ) ) and ( f l o o r ( x ) ) stand for rounding up or down a real value to the next larger respectively to the next smaller integer.

Annex 0: General Data, Vectors, and Functions

In the following all formula are checked with numeric results. The set of primes and the listed known formula below are used for this checking. Some vectors of the results of the known formula, which are often used, are evaluated and the results are saved.

The set of primes is read from a file: ( P : = READPRN ( " PRimes_large .prn " ) ). The number of primes in the set and their numbering are: ( N P : = rows ( P ) 1 = 5003713 , n : = 1 , 2 , , N P ).

The number of primes up to (c) is approximated with the prime-number-formula ( S ( c ) ). At (c) only the multiples of the primes up to ( c ) are covering free integral positions ( R ( c ) = S ( c ) ). The numbers of these primes are given as well:

P ( S ( c ) ) < c < P ( S ( c ) + 1 ) ; π c ( c ) > S ( c ) : = floor ( c ln ( c ) ) c ln ( c ) (A0.1)

P ( R ( c ) ) < c < P ( R ( c ) + 1 ) ; π c ( c ) > S ( c ) = R ( c ) : = floor ( c ln ( c ) ) c ln ( c )

For the evaluation of the effective number of free positions up to the distance (c) the routine ( n n e x t ( c , n l a s t ) ) resulting the index (n) of the prime next to any integer is needed ( P ( n ) c < P ( n + 1 ) ). The evaluation starts either at the last evaluated index ( n l a s t ), or at the index resulting from the prime-number-formula. This, to shorten some of the evaluation processes. Further functions are the indexes of the closest primes to any distance, and to the square root of any distance, as well as a short expression for the exponential function:

=;; (A0.2)

In the following all functions, which are evaluated for illustration, are evaluated at sparse distances, equal to multiples of the square root of the largest

distance considered ( c s p ( k ) = k P ( N P ) ):

Δ c s p : = P ( N P ) ; k l i m i t : = floor [ P ( N P ) Δ c s p ] 1 = 9277 ;

k : = 1 , 2 , , k l i m i t ; c s p ( k ) : = k Δ c s p (A0.3)

The vectors of the indexes of the primes corresponding to these sparse distances, respectively to the next smaller primes ( P [ n s p ( k ) ] < c s p ( k ) < P [ n s p ( k + 1 ) ] ) are evaluated for ( π s p ( c ) ), ( π s p ( c ) ), and ( π s p ( c ) ). They are evaluated once and written to files. They are read from these files:

π s p ( k ) : = n n e x t [ c s p ( k ) , 1 ] ; π s q r _ s p ( k ) : = n n e x t [ c s p ( k ) , 1 ] ;

π s q r _ s q r _ s p ( k ) : = n n e x t [ c s p ( k ) , 1 ] (A0.4)

WRITEPRN ( " index_distance_sp .prn " ) : = π s p ; π s p : = READPRN ( " index_distance_sp .prn " ) ; length ( π s p ) = 9278

WRITEPRN ( " n_sqr_sp_primes .prn " ) : = π s q r _ s p ; π s q r _ s p : = READPRN ( " n_sqr_sp_primes .prn " ) ; length ( π s q r _ s p ) = 9278

WRITEPRN ( " n_sqr_sqr_sp_primes .prn " ) : = π s q r _ s q r _ s p ; π s q r _ s q r _ s p : = READPRN ( " n_sqr_sqr_sp_primes .prn " )

Annex 1. Evaluation of the Number of Primes as Sum over Sections

The number of primes as sum over sections is evaluated with (1.2) as a first simplification:

π s e c _ a p p r _ ( c ) = j = 1 c c ln ( j c ) (A1.1)

The number of primes resulting from the second simplification (1.3) results the PNF. The difference between the first and the second simplification results the error of the PNF. At the dinstance (c) it is proportional to ( R ( c ) 2 ), the square of the number of primes covering positions at the distance ( c ). The factor of proportionality is evaluated over the distance with (1.4):

γ c _ a p p r _ ( k ) : = 1 R [ c s p ( k ) ] [ j = 1 c e i l [ c s p ( k ) ] ln [ c s p ( k ) ] ln [ j c s p ( k ) ] 1 2 c s p ( k ) ] (A1.2)

The factors are evaluated once and written to a file. They are read from this file:

WRITEPRN ( " gamma_c_appr_sp .prn " ) : = γ c _ a p p r _ ; γ c _ a p p r _ : = READPRN ( " gamma_c_appr_sp .prn " )

The factors are approaching a constant value: (FigureA1.1)

γ c _ a p p r : = γ c _ a p p r _ ( k l i m i t ) = 0.28312

Figure A1.1. Relation of the error of the prime-number-formula to the square of the number of the series of multiples of primes, which are covering positions, over the distance.

The approximating function is evaluated at sparse distances, respectively at the next smaller prime to these distances ( P [ n s p ( k ) ] < c s p ( k ) < P [ n s p ( k + 1 ) ] ) with (1.2). They are evaluated similarly as well at the square root and at the square root of the square root of these sparse distances. The evaluation at the next smaller prime corresponding to each distance assures that the evaluated numbers of the primes correspond exactly to the distances considered:

π s e c _ a p p r ( k ) : = π s e c _ a p p r _ [ P [ π s p ( k ) ] ] ; π s q r _ s e c _ a p p r ( k ) : = π s e c _ a p p r _ [ P [ π s q r _ s p ( k ) ] ] (A1.3)

π s q r _ s q r _ s e c _ a p p r ( k ) : = π s e c _ a p p r _ [ P [ π s q r _ s q r _ s p ( k ) ] ]

They are evaluated once and written to files. They are read from these files:

WRITEPRN ( " pr_sec_appr_sp_t .prn " ) : = π s e c _ a p p r ; π s e c _ a p p r : = READPRN ( " pr_sec_appr_sp_t .prn " ) ;

WRITEPRN ( " pr_sqr_sec_appr_sp_t .prn " ) : = π s q r _ s e c _ a p p r ; π s q r _ s e c _ a p p r : = READPRN ( " pr_sqr_sec_appr_sp_t .prn " ) ;

WRITEPRN ( " pr_sqr_sqr_sec_appr_sp_t .prn " ) : = π s q r _ s q r _ s e c _ a p p r ; π s q r _ s q r _ s e c _ a p p r : = READPRN ( " pr_sqr_sqr_sec_appr_sp_t .prn " )

Annex A2. Evaluation of the Factor of Correction of the First Simplification

The result of the first simplification (1.2) giving the sum over the sections of the density of primes has an error. This error is proportional to the number of primes up to ( c ). The error relative to ( π ( c ) ) results the factor of correction. Assuming the factor of correction ( γ s e c ) is constant over the distance (c), it may be evaluated as relation of the average error to the effective number of primes ( π ( c ) = π s p ( k ) ). The average error is:

Δ π s e c ( k ) : = π s e c _ a p p r ( k ) π s p ( k ) ; Δ π s e c _ a v ( k ) : = 1 k j = 1 k [ Δ π s e c ( j ) ] (A2.1)

The value of the factor of correction is herewith:

Figure A2.1. Convergence of the relation of the average relative error of the first simplification (1.2) to the final constant value ( γ s e c ).

γ s e c ( c ) = Δ π s e c _ a v ( c ) π ( c ) ; γ s e c _ ( k ) : = 2 Δ π s e c _ a v ( k ) π s q r _ s e c _ a p p r ( k ) ; γ s e c : = γ s e c _ ( k l i m i t ) = 0.035513 (A2.2)

FigureA2.1 shows the independence of the factor of correction ( γ s e c ) from the distance. The averaging process (A2.1) to evaluate the factor of correction is therefore justified. This factor ( γ s e c = 0.035513 ) is invariant, an inherent property of the prime numbers:

Annex A3. Evaluation of the CPNF

The CPNF (1.9) is evaluated with the following routine:

; (A3.1)

The results of the CPNF are evaluated once at sparse values of the distance ( c s p ( k ) ), for (c), ( c ) and ( c ). They are written to files and are read from these files:

WRITEPRN ( " Pi_appr_sp .prn " ) : = π a p p r , π a p p r : = READPRN ( " Pi_appr_sp .prn " ) ,

WRITEPRN ( " Pi_sqr_appr_sp .prn " ) : = π s q r _ a p p r , π s q r _ a p p r : = READPRN ( " Pi_sqr_appr_sp .prn " )

WRITEPRN ( " Pi_sqr_sqr_appr_sp .prn " ) : = π s q r _ s q r _ a p p r , π s q r _ s q r _ a p p r : = READPRN ( " Pi_sqr_sqr_appr_sp .prn " ) .

Figure A3.1. The relative dispersion of the difference between the effective number of primes and its value evaluated with the complete-prime-number-formula (CPNF).

Figure A3.2. Relation of the error of the PNF to ( R ( c ) 2 ), the square of the number of primes up to ( c ), over the distance.

π a p p r ( k ) : = π a p p r _ [ P [ π s p ( k ) ] ] ; π s q r _ a p p r ( k ) : = π a p p r _ [ P [ π s q r _ s p ( k ) ] ] ;

π s q r _ s q r _ a p p r ( k ) : = π a p p r _ [ P [ π s q r _ s q r _ s p ( k ) ] ] (A3.2)

(FigureA3.1) There is no systematic error of the number of primes resulting with the CPNF. The dispersion of the evaluated values relative to the effective number of primes at ( c ) is about constant over the distance up to (c), ( c ) and ( c ):

Δ π a p p r _ r e l ( k ) : = π a p p r ( k ) π s p ( k ) R [ 1 c s p ( k ) ] ; Δ π s q r _ a p p r _ r e l ( k ) : = π s q r _ a p p r ( k ) π s q r _ s p ( k ) R [ 1 c s p ( k ) ] (A3.3)

Δ π s q r _ s q r _ a p p r _ r e l ( k ) : = π s q r _ s q r _ a p p r ( k ) π s q r _ s q r _ s p ( k ) R [ 1 c s p ( k ) ]

with the results of the CPNF the factor of the proportionality ( γ c ) of the error of the PNF relative to the square of the number of primes present up to ( c ) evaluated in (A1.2) with (1.4), is reevaluated with the more exact difference as follows: (FigureA3.2)

π a p p r _ c p n f _ ( c ) R ( c ) 2 = γ c p n f _ ( k ) : = π a p p r ( k ) s [ c s p ( k ) ] R [ c s p ( k ) ] 2 (A3.4)

Annex A4. Evaluation of the Standard Deviation of the Dispersion of the Effective Number of Primes around the CPNF

The standard deviation SD of the relative dispersion (1.13) is evaluated as follows:

S D Δ π _ a p p r _ r e l ( k ) : = 1 k j = 1 k [ π a p p r ( j ) π s p ( j ) ] 2 R e f f [ c s p ( j ) ] 2 (A4.1)

The results are evaluated once and written to a file: ( WRITEPRN ( " SD_ Δ prime_sqr_appr_rel .prn " ) : = S D Δ π _ a p p r _ r e l ). They are read from this file: ( S D Δ π _ a p p r _ r e l : = READPRN ( " SD_ Δ prime_sqr_appr_rel .prn " ) ).

The average of the relation of the standard deviation converges to a final value, to the factor of proportionality ( F S D _ Δ π ). This factor is evaluated as follows:

S D Δ π _ a p p r _ r e l _ a v ( k ) : = 1 k j = 1 k S D Δ π _ a p p r _ r e l ( j ) (A4.2)

The results are evaluated once and written to a file. They are read from this file:

WRITEPRN ( " SD_ Δ prime_sqr_appr_rel_av .prn " ) : = S D Δ π _ a p p r _ r e l _ a v S D Δ π _ a p p r _ r e l _ a v : = READPRN ( " SD_ Δ prime_sqr_appr_rel_av .prn " )

The constant factor is equal to the final average value of the standard deviation at large distances. The figure below illustrates that the standard deviation is about constant over the distance. This fact rectifies taking the average over the whole distance for the evaluation:

F S D _ Δ π : = S D Δ π _ a p p r _ r e l _ a v ( k l i m i t 1 ) = 0.162389 ;

S D π ( c ) S D Δ π _ s p _ r e l _ a v ( k ) R ( c ) F S D _ Δ π (A4.3)

FigureA4.1 below indicates that the standard deviation of the dispersion of the effective number of primes around its approximation is rising proportionally to ( R ( c ) ), the number of the series of multiples of primes, which are covering integer positions at this distance (c). The factor of proportionality ( F S D _ Δ π = 0.162389 ) is again an inherent property of the primes.

Figure A4.1. Dispersion of the standard deviation of the dispersion of the number of primes around its average, the resulting constant value.

Annex A5. Evaluation of the Boundaries of the Dispersion

At the distance (c), with ( R ( c ) ) being the number of the series of multiples of primes covering formerly free positions, the summing of the local density values over (j) is influenced only by ( c ). If for the distance succeeding primes were taken, as in the above evaluations, the size of the gaps between primes would account for the long-range fluctuations. If ( R ( c ) ) changes by unity, there is a jump: At the change of the distance at certain number of primes ( P ( n ) ) the summation-limit changes from ( R ( c ) , c = P ( n ) ) to ( R ( c ) + 1 , c = P ( n + 1 ) ):

from ( c j = 1 R ( c ) 1 ln ( j c ) ) to ( c j = 1 R ( c ) + 1 1 ln ( j c ) ) (A5.1)

The difference makes

( c j = 1 R ( c ) + 1 1 ln ( j c ) c j = 1 R ( c ) 1 ln ( j c ) c ln ( c ) = c 2 ln ( c ) = R ( c ) 2 ). (A5.2)

For illustration, the discontinuity of the approximating function is shown. For this purpose, the values of the approximating function are evaluated in (addition to its sparse values evaluated in (1.4)) at distances corresponding to each prime ( c = P ( q ) , π a p p r _ t e s t ( q ) = π a p p r _ ( q ) ) in the range ( q = q l o w q h i g h ):

from ( q l o w : = 1909500 , P ( q l o w ) = 30887083 ) to ( q h i g h : = 1911600 , P ( q h i g h ) = 30923341 , q : = q l o w q h i g h )

π a p p r _ t e s t ( q ) : = π s e c _ a p p r _ [ P ( q ) ] (A5.3)

The results are written to a file and are read from this file:

WRITEPRN ( " Nprime_appr_c .prn " ) : = π a p p r _ t e s t ; π a p p r _ t e s t : = READPRN ( " Nprime_appr_c .prn " ) .

The discontinuity of the approximating function is shown in FigureA5.1. The size of the jumps (2.2) is the bandwidth of the dispersion due to the approximating function:

π b o u n d s _ a p p r ( c ) = ± R ( c ) 2 (A5.4)

Figure A5.1. Discontinuity due to the approximating function.

Conflicts of Interest

The authors declare no conflicts of interest regarding the publication of this paper.

References

[1] Titchmarsh, E.C. (1986) The Theory of the Riemann Zeta-Function. Oxford University Press, New York.
[2] Pintz, J. (1980) On the Remainder Term of the Prime Number Formula II. On a Theorem of Ingham. Acta Arithmetica, 37, 209-220.
https://doi.org/10.4064/aa-37-1-209-220
[3] Platt, D.J. and Trudgian, T.S. (2021) The Error Term of the Prime Number Theorem. Mathematics of Computation, 90, 871-881.
https://doi.org/10.1090/mcom/3583
[4] Rosser, J.B. and Trudgian, T.S. (1941) Explicit Bounds for Some Functions of Prime Numbers. American Journal of Mathematics, 63, 211-232.
https://doi.org/10.2307/2371291
[5] Rosser, J.B. and Schoenfeld, L. (1962) Approximate Formulas for Some Functions of Primes. Illinois Journal of Mathematics, 6, 64-94.
https://doi.org/10.1215/ijm/1255631807
[6] Green, B. and Tao, T. (2007) The Primes Contain Arbitrary Long Arithmetic Progressions. Annals of Mathematics, 167, 481-547.
https://doi.org/10.4007/annals.2008.167.481

Copyright © 2024 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.