Known primes < 10^n and sum of primes < 10^n
Cino hilliard June 08 2008
Actual Estimate
Primes < 10^n Sum primes < 10^n (10^n)^2/(2*log(10^n)-1.) Relative error
n Pi(10^n)
0 0 0 -1
1 4 17 27
2 25 1060 1217 -0.149034246
3 168 76127 78030 -0.025003555
4 1229 5736396 5740303 -0.000681230
5 9592 454396537 454011971 0.000846321
6 78498 37550402023 37550193649 0.000005549
7 664579 3203324994356 3201414635780 0.000596367
8 5761455 279209790387276 279007258230819 0.000725376
9 50847534 24739512092254535 24723998785919976 0.000627065
10 455052511 2220822432581729238 2219671974013732243 0.000518032
11 4118054813 201467077743744681014 201381995844659893517 0.000422311
12 37607912018 18435588552550705911377 18429088896563917716962 0.000352560
13 346065536839 1699246443377779418889494 1698738497929718386117081 0.000298923
14 3204941750802 157589260710736940541561021 157548836041268621469737798 0.000256519
15 29844570422669 14692398516908006398225702366 14689129661980376124875151612 0.000222486
16 279238341033925 1376110854313351899159632866552 1375842784994205257358484419433 0.000194802
17 2623557157654233 129408626276669278966252031311350 129386370761402459063701962912822 0.000171978
18 24739954287740860 12212914292949226570880576733896687 12211046444229022681106668101629074 0.000152940
19 234057667276344607 1156251260549368082781614413945980126 1156092973401062822090532446879592309 0.000136896
20 2220819602560918840 109778913483063648128485839045703833541 109765382979108556087719263460893002218 0.000123252
21 21127269486018731928
22 201467286689315906290
23 1925320391606818006727
Some "heuristic" analysis. Notice that the sum of primes < 10^n
is about the same as Pi(10^2n)=Pi((10^n)^2). So to put things in powers of
10 for a given n, we write n = 10^x.
Then log(n) = x*log(10) and x = log(n)/log(10). So SumP(n) = sump(10^x) ~
Pi(10^2x) = Pi(10^(2*log(n)/log(10)). Now log10(n) = log(n)/log(10) => 10^log10(n) =
10^(log(n)/log(10)) = n. So 10^(2*log(n)/log(10)) = n^2.
1. SumP(n) ~ Pi(n^2).
Theorem 1.0. The sum of primes < n -> the number of primes < n^2 as n -> infinity.
We know that x/log(x) is asymptotic to Pi(x), so we try that first with x-n^2 as
perameter in our estimator for SumP(n). SumP(n) ~ n^2/(log(n^2) = n^2(2*log(n)). This
gives us reasonable results bet we also know x/(log(x)-1) gives us better results. So we
plug that into 1. to get SumP(n) ~ n^2/(2log(x)-1). This formula gives reasonable
approximations to SumP(n). Here we do not need a prime counting function.
Similarly, we know that Li(x) or the logarithmic integral of x gives a better
approximation for Pi(x) and therefore SumP(x). This is illustrated at the bottom of the
next table which shows Li(x) and R(x).
Sources:
http://www.research.att.com/~njas/sequences/A006880
http://www.research.att.com/~njas/sequences/A046731
Table of sums of primes <= n using R(x) Riemanns approximation of Pi(x)
Absolute
Sum of primes < 10^n Using Riemann's approx Pi(x) Relative Error
n b-file From Marc Deleglise R(10^2n)
1, 17, 25
2, 1060, 1226
3, 76127, 78527
4, 5736396, 5761551
5, 454396537, 455050683 0.0014395928373
6, 37550402023, 37607910542
7, 3203324994356, 3204941731601
8, 279209790387276, 279238341360977
9, 24739512092254535, 24739954284239494
10,2220822432581729238, 2220819602556027015 0.0000012743142
11,201467077743744681014, 201467286689188773625
12,18435588552550705911377, 8435599767347541878146
13,1699246443377779418889494, 1699246750872419991992147
14,157589260710736940541561021, 157589269275973235652219770 0.0000000259190
15,14692398516908006398225702366, 14692398897720432716641650390
16,1376110854313351899159632866552, 1376110866993765865297692177651
17,129408626276669278966252031311350, 129408626505158941382747240985638
18,12212914292949226570880576733896687, 12212914297619365442544535529374722
19,1156251260549368082781614413945980126, 1156251261026516898000789475178448811
20,109778913483063648128485839045703833541, 109778913489828302826978255361638504017 6.162071097138 E-11
My est
21,10448389020120550001479419524236673460613,10449550362264587535471276942848363541143.
Indeed, we know Li(x) or the Logarithmetic Integral gives superior results for
Pi(x) just like Gauss thought it would. Later Riemann came up with a better
estimator for Pi(x) using Li(x). I scripted these Pari functions for the calculations
that follow.
R(x) = local(j); (sum(j=1,400,
Li(x) = local(x);-eint1(
0 0
1 5
2 17
3 100
4 791
5 5830
6 42468
7 327198
8 2575838
9 20476640
10 166554645
11 1353822880
12 11150031169
13 92258920888
14 769310640408
15 6447635236133
16 54292816788848
17 459112338326268
18 3896226837717653
19 33172345145637461
20 283258796052356059
21 2425130743589880412
22 20812174068479995267
23 178994621907080881265
24
Number of primes <= 3^n A057958
0 0
1 2
2 4
3 9
4 22
5 53
6 129
7 327
8 847
9 2227
10 5968
11 16097
12 43934
13 120739
14 334349
15 931260
16 2607165
17 7332159
18 20700806
19 58648288
20 166677978
21 475023803
22 1357200840
23 3886548158
24 11152818693
25 32064929886
26 92349038518
27 266398236486
28
0,2,4,9,22,53,129,327,847,2227,5968,16097,43934,120739,334349,931260,2607165,7332159,20700806,
58648288,166677978,475023803,1357200840,3886548158,11152818693,32064929886,92349038518,266398236486
Cino Hilliard