Quantcast
Channel: 円周率近似値の日に生まれて理系じゃないわけないだろ! - knifeのblog
Viewing all articles
Browse latest Browse all 5376

n番目の素数の近似式について

$
0
0

n番目の素数は、どのくらいの大きさなのか。

n番目の素数をPnとすると、
Pn ≈ log2n!
となるようです。

n!の近似式、スターリングの近似式と、その式の精度を上げる方法を書きました。



n! ≈ 2nπ・(n/e)n・{m}

mで精度を上げることが出来ます。
とりあえず、m=1としておきます。

どちらの式をみても、
n番目の素数の近似式で、なんでlogの底が2なんだろうとか、
n!のの近似式で、なんでルート、つまり1/2乗が出てくるんだろうとか、
不思議な感じがします。

これら2式より、

Pn ≈ n・log2(n/e)+(1/2)・log22nπ

もし、近似式の精度をあげる必要があるならば、

Pn ≈ n・log2(n/e)+(1/2)・log22nπ+log2m

となるだろうが、あまり意味をなさないかもしれません。

さて、実際にどれくらい精度があるのかを見てみると、

 

12-0.12-0.058473
230.940.313453
352.550.509006
474.550.650710
5116.880.625716
6139.470.728603
71712.280.722473
81915.280.804431
92318.460.802425
102921.780.751001
113125.240.814180
123728.830.779066
134132.530.793333
144336.330.844992
154740.240.856215
165344.240.834767
175948.330.819162
186152.500.860670
196756.750.847002
207161.070.860160
217365.460.896767
227969.920.885110
238374.450.896957
248979.030.888007
259783.680.862646
2610188.380.875023
2710393.130.904198
2810797.940.915326
29109102.800.943101
30113107.710.953142
31127112.660.887082
32131117.660.898164
33137122.700.895650
34139127.790.919364
35149132.920.892087
36151138.090.914510
37157143.300.912742
38163148.550.911341
39167153.830.921162
40173159.160.919977
41179164.510.919071
42181169.910.938707
43191175.330.917971
44193180.790.936745
45197186.280.945603
46199191.810.963856
47211197.360.935365
48223202.950.910077
49227208.560.918775
50229214.210.935396
51233219.880.943683
52239225.580.943844
53241231.310.959779
54251237.060.944468
55257242.840.944914
56263248.650.945439
57269254.480.946035
58271260.340.960669
59277266.220.961097
60281272.130.968437
61283278.060.982550
62293284.020.969338
63307289.990.944603
64311295.990.951747
65313302.020.964906
66317308.060.971798
67331314.130.949022
68337320.210.950189
69347326.320.940410
70349332.450.952583
71353338.600.959211
72359344.770.960366
73367350.960.956297
74373357.170.957562
75379363.400.958838
76383369.650.965137
77389375.910.966360
78397382.200.962719
79401388.500.968836
80409394.830.965343
81419401.170.957435
82421407.520.967988
83431413.900.960320
84433420.290.970647
85439426.700.971981
86443433.130.977711
87449439.570.978995
88457446.030.975992
89461452.500.981571
90463459.000.991352
91467465.500.996796
92479472.030.985443
93487478.570.982683
94491485.120.988027
95499491.690.985353
96503498.280.990608
97509504.880.991898
98521511.490.981748
99523518.120.990669
100541524.760.969989
101547531.420.971521
102557538.090.966058
103563544.780.967639
104569551.480.969212
105571558.200.977576
106577564.920.979070
107587571.670.973876
108593578.420.975413
109599585.190.976942
110601591.970.984974
111607598.760.986432
112613605.570.987881
113617612.390.992531
114619619.221.000363
115631626.070.992187
116641632.930.987407
117643639.800.995021
118647646.680.999507
119653653.581.000882
120659660.481.002250
121661667.401.009685
122673674.331.001980
123677681.271.006314
124683688.231.007656
125691695.191.006071
126701702.171.001672
127709709.161.000227
128719716.160.996051
129727723.170.994735
130733730.190.996172
131739737.230.997602
132743744.271.001712
133751751.331.000436
134757758.391.001841
135761765.471.005874
136769772.561.004627
137773779.661.008611
138787786.760.999701
139797793.880.996090
140809801.010.990127
141811808.150.996489
142821815.300.993060
143823822.460.999346
144827829.631.003182
145829836.811.009423
146839844.001.005961
147853851.200.997891
148857858.411.001646
149859865.631.007718
150863872.861.011424
151877880.101.003531
152881887.351.007202
153883894.601.013140
154887901.871.016764
155907909.151.002365
156911916.431.005961
157919923.731.005142
158929931.031.002184
159937938.341.001432
160941945.661.004956
161947952.991.006330
162953960.331.007697
163967967.681.000707
164971975.041.004162
165977982.411.005535
166983989.781.006900
167991997.171.006222
1689971004.561.007581
16910091011.961.002933
17010131019.371.006287
17110191026.791.007641
17210211034.211.012941
17310311041.651.010327
17410331049.091.015576
17510391056.541.016883
17610491064.001.014300
17710511071.471.019475
17810611078.941.016913
17910631086.431.022040
18010691093.921.023312
18110871101.421.013266
18210911108.931.016432
18310931116.441.021449
18410971123.971.024583
18511031131.501.025837
18611091139.041.027085
18711171146.581.026486
18811231154.141.027728
18911291161.701.028965
19011511169.271.015874
19111531176.851.020684
19211631184.431.018430
19311711192.031.017956
19411811199.631.015771
19511871207.231.017046
19611931214.851.018313
19712011222.471.017877
19812131230.101.014097
19912171237.741.017039
20012231245.381.018299
30019872041.281.027316
40027412886.111.052941
50035713767.351.054986
100079198529.401.077080
20001738919052.991.095692
30002744930331.261.105004
40003781342099.671.113365
50004861154232.561.115644
10000104729118458.141.131092
20000224737256908.821.143153
30000350377402908.161.149928
40000479909553809.661.153989
50000611953708356.401.157534
10000012997091516704.171.166957
20000027501593233399.221.175714
30000042562335025582.801.180758
40000058000796866788.801.183913
50000073687878744447.561.186688
10000001548586318488884.821.193920
20000003245284338977758.851.201058
30000004997968760221520.171.204920
40000006786796781955506.411.207573
500000086028121104054020.571.209535
10000000179424673218108029.191.215597
20000000373587883456216045.921.221175
30000000573259391701872937.471.224355
40000000776531401952432078.891.226521
500000009824516531206636500.021.228189


思ったよりも精度が出ないですね。

 

ではでは


Viewing all articles
Browse latest Browse all 5376

Trending Articles