The number of primes

The prime-number-formula at any distance from the origin has a systematic error, proportional to the square of the number of primes up to the square root of the distance. The proposed completion in the present paper eliminates by a quickly converging recursive formula the systematic error. The remaining error is reduced to a symmetric dispersion, with standard deviation proportional to the number of primes at the square root of the distance. 1: Evaluation of the number of primes The total number of the primes is the integral of the local logarithmic density of free positions, evaluated by Riemann. The first approximation of the integral is the sum of the logarithmic density over all integers, in the following used as sum over all integers: π c ( )= 2 c c 1 ln c ( )     d πln_appr c ( )  2 c n 1 ln n ( )   (1.1) This above sum may be written as summing up first over all integers within the sections of the length ( c ) and then summing up over all the ( c ) sections of the length ( c ). Taking the average value over each section and summing up over the sections is an approximation, in the following used as sum over all sections.

The results of the CPNF are evaluated in annex 3 and compared with the effective number of primes. There is no systematic error. The remaining error, the dispersion around the CPNF is proportional to the number of primes ( R c ( )), the multiples of which are covering positions at ( c).
Therefore the dispersion relative to the CPNF has a constant width and symmetrical around zero: subsections. Each time ( R c ( )) changes by unity, there is a discontinuity in the summation procedure. The same is happening by each of the following summing, but with diminishing amplitude and higher frequency. For the first and largest effect this is illustrated below for the original PNF: 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 ( ) ). (2.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 ( ) The results are written to a file: ( WRITEPRN "Nprime_appr_c.prn"  π appr_test  ). They are read from these files each time the present paper is evaluated: ( π appr_test READPRN "Nprime_appr_c.prn"    . The discontinuity of the approximating function is shown in the next figure. The size of the jumps (2.2) is the bandwidth of the dispersion due to the approximating function:

Figure 2.1: Discontinuity of the approximating function
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 covers positions at the distance ( c ). 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 ) is 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 ( c ) both side of the point at the distance ( c ). At the origin all the series of multiples of the ( R c ( )) primes coincide and each series covers at least two positions around the origin, within the cover interval. A complete coincidence occurs next times at the distance equal to the product of all first ( R c ( )) primes.
02/11/2021 3 Doroszlai The number of primes In the following only the series of multiples of the primes in the range ( P n ( ) ) will be taken into consideration. This does not influence the validity of the proof, since nearly all primes are in this range.
At any distance ( c ), up to ( c 2 ) most of the series of multiples of primes are shifted with reference to ( c ).
All these shifted series liberate by the 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 isbefore the shifting -equidistant to two other primes. It can be proved, that the density of such three equidistant primes at the distance ( c ) is ( ). It can be shown, that all other 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 has to be smaller, then the distance ( c ). The largest number of the series of multiples of primes are coinciding, if the the first ( q ) primes are coinciding: The number ( Q c ( )) is growing very slowly with the distance ( c ). Its effect may be neglected against ( 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 of the series of multiples of primes may be reduced because 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, rising the remaining free positions. The number of the primes, which may participate in this effect is limited and the effect may be neglected against ( 1 2 R c ( )  ), the average value of free positions remaining. Therefore the total dispersion is proportional to ( R c ( )), as stated in the lemma and concluding the proof.
With this lemma the divergence of the number of primes within each section of the length ( c ) at the distance ( j c  ) is certainly smaller, then 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 ( π appr C ( )) is limited to the number of the series of multiples of primes covering positions at this distance: Lemma 2.1 is in accordance with the fact -demonstrated in (1.13) -that the standard deviation of the dispersion around the best estimate approximation of the number of primes -resulting from the CPNF -is constant over the distance to the origin. The constancy of the standard deviation of the dispersion around the best estimate approximation of the number of primes -resulting from the CPNFis an inherent property of the prime numbers.
From this lemma 2.1 follows, that 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 any constant factor): With this boundary growing to infinity, the upper limit of the gap between consecutive primes is unlimited. 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: 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 then the width of the dispersion of the number of primes ( R c ( )) multiplied by any constant factor ( K 1  ) ). For any sufficiently large distance ( c limit γ c   < c ) the difference between the value of the (CPNF) and the

Proof
as stated in the lemma and concluding the proof.
From this lemma 2.2 follows, that the CPNF 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.

3: Conclusions
For large distances the CPNF gives a result for the number of primes as good as Riemann's formula: There is no systematic error involved. The explication for this fact is, that Riemann's equation 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: For the distance ( c ) growing to infinity, the contribution of the successive components -relative to the effective number of primes approaches zero, leaving the first component, which results the Riemann integral as stated in the lemma, and concluding the proof.
It has to be noted, that the evaluation of the factor ( γ sec ) 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 a converging approximation of the effective number of primes and this fact justifies the evaluation procedure of the factor ( γ sec ) and proofs the validity of its value. 02/11/2021 5 Doroszlai The number of primes

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 is 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: (  ).
The number of primes up to ( c ) is approximated with the prime-number-formula. At ( c ) only the multiples of the primes up to ( c ) are covering free integral positions. The numbers of these primes are: They are evaluated once and written to files. They are read from these files:  ), the square of the number of primes covering positions at the distance ( c ), The factor of proportionality is evaluated as follows: They are evaluated once and written to files. They are read from these files: The approximating function is evaluated at sparse distances, respectively at the next smaller prime to these distances ( P n sp k ( ) . 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: π sec_appr k ( ) π sec_appr_ P π sp k ( ) They are evaluated once and written to files. They are read from these files:


; γ sec γ sec_ k limit The figure below shows the independence of the factor ( γ sec ) from the distance. The averaging process to evaluate the correction is therefore justified. This factor ( γ sec ) is invariant, an inherent property of the prime numbers: The average of the relation of the standard deviation converges to a final value, to the factor of proportionality ( F SD_Δπ ). This factor is evaluated as follows: The results are evaluated once and written to a file. They are read from this file: 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: The figures below indicate, 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 (

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 The results are written to a file: ( WRITEPRN "Nprime_appr_c.prn"  π appr_test  ). They are read from these files each time the present paper is evaluated: ( π appr_test READPRN "Nprime_appr_c.prn"    . The discontinuity of the approximating function is shown in the next figure. The size of the jumps (2.2) is the bandwidth of the dispersion due to the approximating function: