A006879
Number of primes with n digits.
Original entry on oeis.org
0, 4, 21, 143, 1061, 8363, 68906, 586081, 5096876, 45086079, 404204977, 3663002302, 33489857205, 308457624821, 2858876213963, 26639628671867, 249393770611256, 2344318816620308, 22116397130086627, 209317712988603747, 1986761935284574233, 18906449883457813088, 180340017203297174362
Offset: 0
As 2, 3, 5, and 7 are the only primes less than 10, a(1) = 4.
- J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 21, pp 8, Ellipses, Paris 2008.
- C. T. Long, Elementary Introduction to Number Theory. Prentice-Hall, Englewood Cliffs, NJ, 1987, p. 77.
- P. Ribenboim, The Book of Prime Number Records. Springer-Verlag, NY, 2nd ed., 1989, p. 179.
- D. Shanks, Solved and Unsolved Problems in Number Theory. Chelsea, NY, 2nd edition, 1978, p. 15.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 113.
- Jianing Song, Table of n, a(n) for n = 0..29 (terms 0..24 by Charles R Greathouse IV, a(25) by Vladimir Pletser, a(26)-a(28) from David Baugh, a(29) based on A006880)
- C. K. Caldwell, How Many Primes Are There?
- Vladimir Pletser, Global Generalized Mersenne Numbers: Definition, Decomposition, and Generalized Theorems, Preprints.org, 2024. See p. 20.
- Index entries for sequences related to numbers of primes in various ranges.
A309359
Median of the primes p with 2^(n-1) < p < 2^n.
Original entry on oeis.org
6, 12, 23, 47, 97, 191, 383, 761, 1523, 3049, 6107, 12252, 24376, 48877, 97777, 195659, 391623, 783257, 1566386, 3133974, 6269116, 12538053, 25082361, 50170976, 100353498, 200730129, 401498897, 803081460, 1606292647, 3212862108
Offset: 3
a(3) = 6: 2^2 < {5, 7} < 2^3, (5 + 7)/2 = 6.
a(4) = 12: 2^3 < {11, 13} < 2^4, (11 + 13)/2 = 12
a(5) = 23: 2^4 < {17, 19, 23, 29, 31} < 2^5, median = 23.
A131043
Number of primes between 10^n and 10^n+10^(n-1).
Original entry on oeis.org
1, 4, 16, 106, 861, 7216, 61938, 541854, 4814936, 43336106, 394050419, 3612791400, 33353349498, 309745405634, 2891246183239, 27107799609004, 255151905596682, 2409933230413924, 22832347500212719, 216919281298152512, 2066001163137387739, 19721816247905813257
Offset: 1
For n=2, the 4 primes in the range 100 to 110 are 101,103,107,109. So 4 is the second entry in the sequence.
-
/*Some functions*/ pr11(n) = primepi(10^n+10^(n-1))-primepi(10^n) Rpr11(n) = R(10^n+10^(n-1))-R(10^(n)) R(x) = local(j); (sum(j=1,400,moebius(j)*Li(x^(1/j))/j)) /*End functions*/ for(x=1,9,print1(pr11(x),","))
A328032
If there are m primes between 10^(n-1) and 10^n, a(n) is the middle prime if m is odd, otherwise the larger of the two middle primes.
Original entry on oeis.org
5, 47, 509, 5273, 53047, 532907, 5356259, 53765519, 539119753, 5402600081, 54118210441, 541947386821, 5425907665571, 54313871643797, 543611236251491, 5440228524355381, 54438462600610513, 544705097744731559, 5449909581264135103
Offset: 1
a(1) is 5 since, among the single-digit primes, i.e., {2, 3, 5, 7}, the two middle primes are {3, 5}, of which the larger one is 5;
a(2) is 47 since it is the middle prime of the two-digit primes, i.e., {11, 13, 17, ..., 47, ..., 83, 89, 97};
a(3) is 509 since it is the middle prime of the three-digit primes, i.e., {101, 103, 107, ..., 509, ..., 983, 991, 997}.
-
f[n_] := Block[{p = PrimePi[ 10^(n -1)], q = PrimePi[ 10^n]}, Prime[ Ceiling[(q +p +1)/2]]]; Array[f, 13]
A387500
Median of twin prime pairs with n decimal digits.
Original entry on oeis.org
5, 36, 420, 4644, 51060, 518238, 5206320, 52565169, 528113445, 5302625562
Offset: 1
a(1): 2 pairs {3,5}, {5,7}, median = mean of {4,6} = 5;
a(2): 6 pairs {11,13}, {17,19}, {29,31}, {41,43}, {59,61}, {71,73}, median = mean of {30,42} = 36.
-
a[n_]:=Module[{s={},p=NextPrime[10^(n-1)]},While[p<10^n-4,If[PrimeQ[p+2],AppendTo[s,p+1]];p=NextPrime[p]];Median[s]];Array[a,7] (* James C. McMahon, Sep 02 2025 *)
Showing 1-5 of 5 results.
Comments