Fraction of Primes in the First n Integers
Author
Lester Telser
Title
Fraction of Primes in the First n Integers
Description
A new better formula giving the fraction of primes in the first n integers
Category
Essays, Posts & Presentations
Keywords
Primes, fraction of primes in integers, infimum
URL
http://www.notebookarchive.org/2021-02-a5pf5rf/
DOI
https://notebookarchive.org/2021-02-a5pf5rf
Date Added
2021-02-22
Date Last Modified
2021-02-22
File Size
94.41 kilobytes
Supplements
Rights
Redistribution rights reserved



Fraction of Primes in the First n Integers
L. G. Telser
This essay has a program that counts all the primes in the set of integers from 1 to n. The results are shown in a table for selected sub intervals and in a graph.
In[]:=
fig[top_Integer]:=Table[{6x+5,PrimeQ[6x+5]},{x,0,top}]
In[]:=
Count[Flatten[fig[64000]],True]
Out[]=
16338
In[]:=
N[16338/64000,12]
Out[]=
0.255281250000
In[]:=
Count[Flatten[fig[32000]],True]
Out[]=
8676
In[]:=
N[8676/32000,8]
Out[]=
0.27112500
In[]:=
Count[Flatten[fig[16000]],True]
Out[]=
4634
In[]:=
N[4634/16000,8]
Out[]=
0.28962500
In[]:=
Count[Flatten[fig[8000]],True]
Out[]=
2485
In[]:=
N[2485/8000,8]
Out[]=
0.31062500
In[]:=
Count[Flatten[fig[4000]],True]
Out[]=
1344
In[]:=
N[1344/4000,6]
Out[]=
0.336000
In[]:=
Count[Flatten[fig[2000]],True]
Out[]=
725
In[]:=
N[725/2000,6]
Out[]=
0.362500
In[]:=
Count[Flatten[fig[1000]],True]
Out[]=
397
In[]:=
N[397/1000,4]
Out[]=
0.3970
In[]:=
Count[Flatten[fig[800]],True]
Out[]=
327
In[]:=
N[327/800,4]
Out[]=
0.4088
In[]:=
Count[Flatten[fig[400]],True]
Out[]=
180
In[]:=
N[180/400,4]
Out[]=
0.4500
In[]:=
Count[Flatten[fig[200]],True]
Out[]=
100
In[]:=
N[100/200,4]
Out[]=
0.5000
In[]:=
Count[Flatten[fig[100]],True]
Out[]=
57
In[]:=
N[57/100,4]
Out[]=
0.5700
In[]:=
Count[Flatten[fig[50]],True]
Out[]=
32
In[]:=
N[32/50,4]
Out[]=
0.6400
In[]:=
Count[Flatten[fig[25]],True]
Out[]=
18
In[]:=
N[18/25,4]
Out[]=
0.7200
Pictures
In[]:=
lin:=Graphics[{Black,Thickness[Large],Dashed,Line[{{0,0.26},{100000,0.26}}]}]
In[]:=
rat:={{25,0.72},{50,0.64},{100,0.57},{200,0.5},{400,0.45},{800,0.4088},{1000,.397},{2000,0.3625`6.},{4000,0.336`6.},{8000,0.310625`8.},{16000,0.289625`8.},{32000,0.271125`8.},{64000,0.25528125`12.}}
The terms in rat are {n, prime[n]/n]}. It is a decreasing, convex function.
In[]:=
grph:=ListPlot[rat,PlotStyle{Blue,PointSize[Large]},PlotLabel"Fraction of Primes in First 64000 Integers"]
In[]:=
grph
Out[]=
grph:=ListPlot[rat,JoinedTrue,PlotStyle{Blue,PointSize[Large]},PlotLabel"Fraction of Primes in First 64000 Integers"]
In[]:=
grph
Out[]=
In[]:=
Show[grph,lin,RangeAll]
Out[]=
The fraction of primes in the integers from 1 to 64000 is 0.25528125`12. The line in the graph is 0.26.
Summary
According to my version of the Euclid Theorem, the number of primes has no finite upper bound. Therefore, the infimum of the ratio is zero and is never reached. Even for 64000 integers, it is not zero and decreases very slowly. Any finite even number could be the length of an interval between two successive primes. The primes are a countably infinite subset of the non zero integers. Intervals between successive primes are even numbers. Each interval is finite and big enough to include one prime. Ratios are more easily measured, more accurate and better understood than π(x).
Curve Fitting
The preceding sections describe the data. This section tries to fit a curve to the data.The function τ(x)= appears a better fit to the data than functions , 0 < β < 1, although in HardyPrime.nb I get good fits to the primes using the constant exponent β = .6.
1
α
x
x
-β
x
In[]:=
Plot.25(3.3-1),{x,2,100},Axes{True,True},PlotStyle{Red,Medium}
1/
2
x
x
Out[]=
In[]:=
f[x_]:=(1/4)(14/13)-1
1
4
x
x
In[]:=
Plot[Evaluate[f[x]],{x,1,64000},Axes{True,True},PlotStyle{Red,Medium}]
Out[]=
In[]:=
Limit[f[x],x∞]
Out[]=
1
52
If the coefficient of x approaches 1, then the infimum of f[x] approaches 0.
Conclusions with respect to Economic Applications
Fair m-polygons are either prime or composite. All have (m-1)/2 bands each with m arrows. All the bands in prime m-polygons have only one simple m-circuit. In the composite m-polygons only bands with index k relatively prime to m have bands with only one simple m-circuit. The rest have GCD[k,m] > 1. Each such relatively composite band k has GCD[k,m] simple circuits of size m/GCD[k,m]. Thus prime fair m polygons are less diverse than composite fair m-polygons. Diversity increases with size to the extent that primes are a decreasing fraction of m, the number of vertexes in the m-polygon.
From HardyPrime.nb
Better results by transforming primes instead of indexes
4/5
2
4/5
3
4/5
3
4/5
2
4/5
2
4/5
3
4/5
2
b=N[-,6]
4/5
3
4/5
2
0.667124
b = 0.667124
a=N[(-(-)),6]
4/5
2
4/5
3
4/5
2
1.07398
The next three graphs plot Prime[n]^0.65 for 3 sets, 1 to 40, 1000 to 1040, 3000 to 3040. A linear equation gives a good fit.
ListPlot[N[Prime[Range[1,40]]^0.64,6],PlotStyle{PointSize[Medium],Red},AxesLabel{"Index","Prime"}]
Show[ListPlot[N[Prime[Range[1,40]]^0.64,6],PlotStyle{PointSize[Medium],Red},AxesLabel{"Index","Prime"}],fml]
The Red Herring Prime Number Theorem
Theorem 6. The Prime Number Theorem. The number of primes not exceeding x is asymptotic to x/log x: π(x)∼(Hardy & Wright, p. 9)See also Hardy Prime.nb
x
logx
In[]:=
N[16000/Log[16000],6]
Out[]=
1652.83
In[]:=
N[1652.83/16000,6]
Out[]=
0.103302
Way too small.
Program


Cite this as: Lester Telser, "Fraction of Primes in the First n Integers" from the Notebook Archive (2021), https://notebookarchive.org/2021-02-a5pf5rf

Download

