cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 46 results. Next

A006880 Number of primes < 10^n.

Original entry on oeis.org

0, 4, 25, 168, 1229, 9592, 78498, 664579, 5761455, 50847534, 455052511, 4118054813, 37607912018, 346065536839, 3204941750802, 29844570422669, 279238341033925, 2623557157654233, 24739954287740860, 234057667276344607, 2220819602560918840, 21127269486018731928, 201467286689315906290
Offset: 0

Views

Author

Keywords

Comments

Number of primes with at most n digits; or pi(10^n).
Partial sums of A006879. - Lekraj Beedassy, Jun 25 2004
Also omega( (10^n)! ), where omega(x): number of distinct prime divisors of x. - Cino Hilliard, Jul 04 2007
This sequence also gives a good approximation for the sum of primes less than 10^(n/2). This is evident from the fact that the number of primes less than 10^2n closely approximates the sum of primes less than 10^n. See link on Sum of Primes for the derivation. - Cino Hilliard, Jun 08 2008
It appears that (10^n)/log((n+3)!) is a lower bound close to a(n), see A025201. - Eric Desbiaux, Jul 20 2010, edited by M. F. Hasler, Dec 03 2018

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 143, 146.
  • Richard Crandall and Carl B. Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2001; p. 11.
  • Keith Devlin, Mathematics: The New Golden Age, new and revised edition. New York: Columbia University Press (1993): p. 6, Table 1.
  • Marcus du Sautoy, The Music of the Primes, Fourth Estate / HarperCollins, 2003; p. 48.
  • Calvin T. Long, Elementary Introduction to Number Theory. Prentice-Hall, Englewood Cliffs, NJ, 1987, p. 77.
  • Paulo Ribenboim, The Book of Prime Number Records. Springer-Verlag, NY, 2nd ed., 1989, p. 179.
  • H. Riesel, "Prime numbers and computer methods for factorization," Progress in Mathematics, Vol. 57, Birkhauser, Boston, 1985, page 38.
  • 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).
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See entry 455052511 at p. 190.

Crossrefs

Programs

Formula

a(n) = A000720(10^n). - M. F. Hasler, Dec 03 2018
Limit_{n->oo} a(n)/a(n-1) = 10. - Stefano Spezia, Aug 31 2025

Extensions

Lehmer gave the incorrect value 455052512 for the 10th term. More terms May 1996. Jud McCranie points out that the 11th term is not 4188054813 but rather 4118054813.
a(22) from Robert G. Wilson v, Sep 04 2001
a(23) (see Gourdon and Sebah) has yet to be verified and the assumed error is +-1. - Robert G. Wilson v, Jul 10 2002 [The actual error was 14037804. - N. J. A. Sloane, Nov 28 2007]
a(23) corrected by N. J. A. Sloane from the web page of Tomás Oliveira e Silva, Nov 28 2007
a(25) from J. Buethe, J. Franke, A. Jost, T. Kleinjung, Jun 01 2013, who said: "We have calculated pi(10^25) = 176846309399143769411680 unconditionally, using an analytic method based on Weil's explicit formula".
a(26) from Douglas B. Staple, Dec 02 2014
a(27) in the b-file from David Baugh and Kim Walisch via Charles R Greathouse IV, Jun 01 2016
a(28) in the b-file from David Baugh and Kim Walisch, Oct 26 2020
a(29) in the b-file from David Baugh and Kim Walisch, Feb 28 2022

A033844 a(n) = prime(2^n).

Original entry on oeis.org

2, 3, 7, 19, 53, 131, 311, 719, 1619, 3671, 8161, 17863, 38873, 84017, 180503, 386093, 821641, 1742537, 3681131, 7754077, 16290047, 34136029, 71378569, 148948139, 310248241, 645155197, 1339484197, 2777105129, 5750079047, 11891268401, 24563311309, 50685770167, 104484802057, 215187847711
Offset: 0

Views

Author

Vasiliy Danilov (danilovv(AT)usa.net), Jun 15 1998

Keywords

Comments

a(n) is the smallest number m such that pi(m)=d(m)^n, where d(m) is number of positive divisors of m (the proof is easy). - Farideh Firoozbakht, Jun 06 2005

Crossrefs

Programs

Extensions

More terms from Robert G. Wilson v, Jun 09 2000

A119290 a(n) is the total number of digits in the first 10^n primes.

Original entry on oeis.org

1, 16, 271, 3803, 48982, 610484, 7245905, 83484450, 942636916, 10487584405, 115369529592, 1257761617574, 13611696080735, 146406754329933, 1566562183907264, 16687323842873339, 177063766685219106, 1872323812397478246, 19738266145121133639, 207517446542560214799, 2176390177056541482871, 22774922890367225576581
Offset: 0

Views

Author

Enoch Haga, May 13 2006

Keywords

Examples

			At a(1) there are 10^1 primes, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, and the total number of digits is 16.
		

Crossrefs

Programs

  • Mathematica
    Accumulate@Table[c = 0; i0 = If[n == 0, 1, 10^(n - 1) + 1]; For[i = i0, i <= 10^n, i++, c += IntegerLength[Prime[i]]]; c, {n, 0, 6}] (* Robert Price, Jun 09 2019 *)

Formula

Count the digits in the first 10^n primes.
a(n) = sum while positive from k=0 to (10^n - A006880(k)). - Charles R Greathouse IV, Jul 09 2007

Extensions

Corrected and extended by Charles R Greathouse IV, Jul 09 2007

A038833 3^n-th prime.

Original entry on oeis.org

2, 5, 23, 103, 419, 1543, 5519, 19289, 65687, 220861, 733561, 2412779, 7867547, 25485211, 82064027, 262960091, 839001721, 2666790167, 8448283757, 26684834641, 84064182061, 264194301347, 828513359549, 2593131866483, 8101615860589, 25270000074757, 78701296245541, 244766272211729, 760254097357847, 2358539553316997
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

Extensions

a(24)-a(29) from Charles R Greathouse IV, Nov 02 2014

A099825 Sum of the first 2^n primes.

Original entry on oeis.org

2, 5, 17, 77, 381, 1851, 8893, 41741, 191755, 868151, 3875933, 17120309, 74950547, 325590115, 1405167561, 6029676711, 25750781177, 109495928099, 463852117169, 1958476902435, 8244703036797, 34615624751259, 144991244981985, 605994279458465, 2527803622205465
Offset: 0

Views

Author

Robert G. Wilson v, Oct 25 2004

Keywords

Crossrefs

Programs

  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; f[0] = 2; f[n_] := f[n] = Block[{k = 0, mx = 2^n/2, np = Prime[2^n/2], s = f[n - 1]}, While[k < mx, k++; np = NextPrim@np; s = s + np]; s]; Table[ f@n, {n, 0, 23}] (* Robert G. Wilson v, Aug 24 2006 *)
    Module[{nn=22,ap},ap=Accumulate[Prime[Range[2^nn]]];Table[ap[[2^n]],{n,0,nn}]] (* Harvey P. Dale, Apr 12 2017 *)
  • PARI
    a(n)=my(s); n=2^n; forprime(p=2,, s+=p; if(n--==0, return(s))) \\ Charles R Greathouse IV, Feb 16 2017 \\ corrected by David A. Corneth, Aug 05 2025

Formula

a(n) = A007504(A000079(n)). - Amiram Eldar, Jul 01 2024

A099824 a(n) = Sum of the first 10^n primes.

Original entry on oeis.org

2, 129, 24133, 3682913, 496165411, 62260698721, 7472966967499, 870530414842019, 99262851056183695, 11138479445180240497, 1234379338586942892505, 135436174616790289414111, 14738971133550183905879827, 1593061976858155930556059673, 171191473337951767580578821529
Offset: 0

Views

Author

Robert G. Wilson v, Oct 25 2004

Keywords

Examples

			For n=1, the sum of the first 10^1 = 10 primes is 2 + 3 + 5 + 7 + 11 + 13 + 17 + 19 + 23 + 29 = 129, so a(1) = 129. - _Michael B. Porter_, Aug 08 2016
		

Crossrefs

Programs

  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; k = p = 1; s = 0; Do[ While[p = NextPrim[p]; s = s + p; k < 10^n, k++ ]; k++; Print[s], {n, 0, 8}]
    Table[Sum[Prime[i], {i, 10^n}], {n, 0, 5}] (* José de Jesús Camacho Medina, Dec 27 2014 *)
  • PARI
    vecA099824(n)={ my(s,c,k=1,L:list); L=List();
    forprime(m=2,prime(10^n),s+=m;c++; if(c==k,listput(L,s);k*=10));
    return(vector(#L,i,L[i]))} \\ R. J. Cano, Aug 12 2016

Formula

a(n) = Sum_{i=1..10^n} A000040(i). - José de Jesús Camacho Medina, Dec 27 2014 (corrected by Joerg Arndt, Jan 05 2015)

Extensions

a(9) from Hans Havermann, May 06 2005
a(10) from Cino Hilliard, Apr 28 2006
a(11) from Cino Hilliard, Oct 03 2006
a(12)-a(13) from Hiroaki Yamanouchi, Jul 06 2014
a(11) corrected by Marc Deleglise, Apr 03 2016
a(14)-a(17) from Marc Deleglise, Apr 03 2016
a(18)-a(20) from Kim Walisch, Jun 05 2016
a(21) from Kim Walisch, Jun 11 2016
a(22) from David Baugh using Kim Walisch's primesum program, Jun 21 2016
a(23) from David Baugh using Kim Walisch's primesum program, Sep 26 2016

A099826 Sum of the first 3^n primes.

Original entry on oeis.org

2, 10, 100, 1264, 15116, 171148, 1864190, 19697700, 203534530, 2067129306, 20706364528, 205144046742, 2014349179358, 19632546354498, 190150622868298, 1831906588192414, 17567504017456404, 167794196312059488, 1597037992049539274
Offset: 0

Views

Author

Robert G. Wilson v, Oct 25 2004

Keywords

Crossrefs

Programs

  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; k = p = 1; s = 0; Do[ While[p = NextPrim[p]; s = s + p; k < 10^n, k++ ]; k++; Print[s], {n, 0, 16}]

Formula

a(n) = A007504(A000244(n)). - Amiram Eldar, Jul 01 2024

Extensions

More terms from Cino Hilliard, Jan 14 2006

A114125 a(n) is the 10^n-th semiprime.

Original entry on oeis.org

4, 26, 314, 3595, 40882, 459577, 5109839, 56168169, 611720495, 6609454805, 70937808071, 757060825018, 8040423200947, 85037651263063, 896113850117314, 9413000361625346, 98597629032410971, 1030179406403917981, 10739422018595513973, 111729397883168684917, 1160260967837159869621
Offset: 0

Views

Author

Robert G. Wilson v, Feb 11 2006

Keywords

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Plus @@ Last /@ FactorInteger@n == 2; c = 0; k = 2; Do[While[c < 10^n, If[fQ@k, c++ ]; k++ ]; Print[k - 1], {n, 0, 8}]
    (* checked by *) SemiPrimePi[n_] := Sum[ PrimePi[n/Prime@i] - i + 1, {i, PrimePi@ Sqrt@n}]
  • Perl
    use ntheory ":all"; print "$ ",nth_semiprime(10**$),"\n" for 0..15; # Dana Jacobsen, Oct 08 2018

Extensions

a(14) from Donovan Johnson, Sep 27 2010
Corrected a(14), added a(15)-a(18) from Dana Jacobsen, Oct 10 2018
a(19)-a(20) from Henri Lifchitz, Nov 08 2024

A121046 Approximation to the (10^n)-th prime by applying a bisection to Gram's formula for Riemann's approximation of the prime counting function.

Original entry on oeis.org

29, 536, 7923, 104768, 1299733, 15484040, 179431239, 2038076587, 22801797576, 252097715777, 2760727752353, 29996225393465, 323780512411510, 3475385760290723, 37124508056355511, 394906913798224975, 4185296581676470068, 44211790234127235470
Offset: 1

Views

Author

Cino Hilliard, Aug 08 2006, Aug 17 2006

Keywords

Comments

The algorithm primex(x) uses an exponent bisection routine and Gram's Riemann approximation, Rg(x) for the prime counting function pi(x). We know that Rg(x) is relatively close to pi(x) as x gets large. We take advantage of this relatively small error noting that pi(prime(x)) = x ~ Rg(prime(x)). A reasonable approximation of prime(x) is x*log(x) while for x = 10^n, often, 10^n*log(10^(n+1)) is a much better approximation. The PARI program shows the flow of this algorithm.

Examples

			pi(10^18) = A006988(18) = 44211790234832169331 and a(18) = 44211790234127235470. So the approximation of pi(10^18) by primex(10^18) is accurate to 11 places.
Agrees for 52 digits with the solution to Li(x)=10^100 given in Mathematics Stack Exchange link. - _Hugo Pfoertner_, Nov 17 2019
		

Crossrefs

Programs

  • PARI
    \\ List the approximations to the (10^n)-th prime by Cino Hilliard
    \\ Gram's Riemann's Approx of Pi(x)
    Rg(x) = { local(n=1, L, s=1, r); L=r=log(x); while(s<10^120*r, s=s+r/zeta(n+1)/n; n=n+1; r=r*L/n); (s) }
    primex(n) = { local(x, px, r1, r2, r, p10, b, e); b=10; p10=log(n)/log(10); if(Rg(b^p10*log(b^(p10+1)))< b^p10, m=p10+1, m=p10); r1 = 0; r2 = 1; for(x=1, 400, r=(r1+r2)/2; px = Rg(b^p10*log(b^(m+r))); if(px <= b^p10, r1=r, r2=r); r=(r1+r2)/2; ); floor(b^p10*log(b^(m+r))+.5); }
    for (k=1,20,print1(primex(10^k),", "))

Extensions

More terms from Hugo Pfoertner, Nov 17 2019
More precise name by Hugo Pfoertner, Apr 29 2021

A145713 Number of primes p in the range 9 < p <= prime(10^n) that begin and end with the same digit.

Original entry on oeis.org

1, 10, 105, 1180, 14143, 158036, 1703161, 17520558, 157563619, 1431557207
Offset: 1

Views

Author

Enoch Haga, Oct 16 2008

Keywords

Examples

			The initial 1 is from the prime 11.
a(4)=1180 because to 10^4 or 10000 primes, ending in 104729=A006988(4), there are 1180 primes with equal and distinct first and last digits: 1 and 1, 3 and 3, 7 and 7 and 9 and 9.
		

Crossrefs

Formula

a(n) = A145709(n) + A145710(n) + A145711(n) + A145712(n). [R. J. Mathar, Aug 02 2010]

Extensions

Edited by N. J. A. Sloane, Aug 16 2010
a(6) corrected and a(7)-a(10) added by D. S. McNeil, Aug 29 2010
Showing 1-10 of 46 results. Next