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.

Previous Showing 11-20 of 233 results. Next

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

Views

Author

Keywords

Comments

The number of primes between 10^(n-1) and 10^n. - Cino Hilliard, May 31 2008 [Corrected by Jon E. Schoenfield, Nov 29 2008]

Examples

			As 2, 3, 5, and 7 are the only primes less than 10, a(1) = 4.
		

References

  • 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.

Crossrefs

First differences of A006880.
Cf. A309329.

Programs

Formula

a(n) = pi(10^n)-pi(10^(n-1)) where pi(10^(-1)) := 0 (cf. A000720 and A006880).
Limit_{n->oo} a(n)/a(n-1) = 10. - Stefano Spezia, Aug 31 2025

Extensions

a(11) and a(12) corrected by Jud McCranie and Enoch Haga
a(19) corrected and a(20) added by Paul Zimmermann
a(21)-a(22) from Vladeta Jovovic, Nov 07 2001

A006988 a(n) = (10^n)-th prime.

Original entry on oeis.org

2, 29, 541, 7919, 104729, 1299709, 15485863, 179424673, 2038074743, 22801763489, 252097800623, 2760727302517, 29996224275833, 323780508946331, 3475385758524527, 37124508045065437, 394906913903735329, 4185296581467695669, 44211790234832169331
Offset: 0

Views

Author

Keywords

Comments

Check the b-file for terms beyond those listed above.

Examples

			a(0) = 10^0-th prime = first prime = 2.
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 111.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A099260, A274767 ((leading) digits of 103-digit a(100)).

Programs

Extensions

More terms from Paul Zimmermann
a(19) from Marc Deleglise, Jun 29 2008
a(20) found by Andrey V. Kulsha using a program by Xavier Gourdon, Oct 05 2011
a(21) from Henri Lifchitz, Sep 09 2014
a(22) from Henri Lifchitz, Nov 21 2014

A091634 Number of primes less than 10^n which do not contain the digit 0.

Original entry on oeis.org

4, 25, 153, 1010, 7122, 52313, 397866, 3103348, 24649318, 198536215, 1616808581, 13287264748, 110033428309, 917072930187
Offset: 1

Views

Author

Enoch Haga, Jan 30 2004

Keywords

Examples

			a(3) = 153 because there are 168 primes less than 10^3, 15 primes have at least one zero; 168 - 15 = 153.
		

Crossrefs

Programs

  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; c = 0; p = 1; Do[ While[ p = NextPrim[p]; p < 10^n, If[ Position[ IntegerDigits[p], 0] == {}, c++ ]]; Print[c]; p--, {n, 1, 8}] (* Robert G. Wilson v, Feb 02 2004 *)
    Table[PrimePi[10^n]-Total[Boole[DigitCount[#,10,0]>0]&/@ Prime[ Range[ PrimePi[ 10^n]]]],{n,8}] (* The program generates the first 8 terms of the sequence. To generate more, increase the digit 8 but the program may take a long time to run. *) (* Harvey P. Dale, Aug 26 2021 *)
  • Python
    from sympy import sieve # use primerange for larger terms
    def nodigs0(n): return '0' not in str(n)
    def aupton(terms):
      ps, alst = 0, []
      for n in range(1, terms+1):
        ps += sum(nodigs0(p) for p in sieve.primerange(10**(n-1), 10**n))
        alst.append(ps)
      return alst
    print(aupton(7)) # Michael S. Branicky, Apr 25 2021

Formula

Number of primes less than 10^n after removing any primes with at least one digit 0.
a(n) <= A052386(n) = 9*(9^n-1)/8. - Charles R Greathouse IV, Sep 13 2016
a(n) <= (9^n-1)/2 = A052386(n)*4/9 since the last digit of a prime of n digits can only be one of 4 numbers, (2,3,5,7) when n = 1 and (1,3,7,9) when n > 1. - Chai Wah Wu, Mar 18 2018

Extensions

Edited and extended by Robert G. Wilson v, Feb 02 2004
a(9)-a(12) from Donovan Johnson, Feb 14 2008
a(13) from Robert Price, Nov 08 2013
a(14) from Giovanni Resta, Mar 20 2017

A091643 Number of primes less than 10^n which do not contain the digit 9.

Original entry on oeis.org

4, 19, 108, 687, 4766, 35139, 267486, 2083814, 16531372, 133059504, 1082995490, 8896945667, 73651718719, 613664827254
Offset: 1

Views

Author

Enoch Haga, Jan 30 2004

Keywords

Examples

			a(2) = 19 because of the 25 primes less than 10^2, 6 have at least one digit 9; 25-6 = 19.
		

Crossrefs

Programs

  • Mathematica
    NextPrim[n_] := Block[{k = n + 1}, While[ !PrimeQ[k], k++ ]; k]; c = 0; p = 1; Do[ While[ p = NextPrim[p]; p < 10^n, If[ Position[ IntegerDigits[p], 9] == {}, c++ ]]; Print[c]; p--, {n, 1, 8}] (* Robert G. Wilson v, Feb 02 2004 *)

Formula

Number of primes less than 10^n after removing any primes with at least one digit 9.
a(n) = A006880(n) - A091710(n).
a(n) <= max(4,24*(9^(n-2))) <= 1 + (9^n)/3 (see formula in A091634). - Chai Wah Wu, Sep 17 2018

Extensions

Edited and extended by Robert G. Wilson v, Feb 02 2004
a(9)-a(12) from Donovan Johnson, Feb 14 2008
a(13) from Robert Price, Nov 08 2013
a(14) from Giovanni Resta, Mar 20 2017

A073517 Number of primes less than 10^n with initial digit 1.

Original entry on oeis.org

0, 4, 25, 160, 1193, 9585, 80020, 686048, 6003530, 53378283, 480532488, 4369582734, 40063566855, 369893939287, 3435376839800, 32069022099022, 300694113015105, 2830466318006780, 26735673312004455, 253315661161665338, 2406763761677705769, 22923886160712831134, 218839439542390117580
Offset: 1

Views

Author

Shyam Sunder Gupta, Aug 14 2002

Keywords

Examples

			a(2)=4 because there are 4 primes up to 10^2 whose initial digit is 1 (11, 13, 17 and 19).
		

Crossrefs

Cf. A000720 (pi), A073509 to A073517, their sum is A006880.
For primes with initial digit d (1 <= d <= 9) see A045707, A045708, A045709, A045710, A045711, A045712, A045713, A045714, A045715; A073517, A073516, A073515, A073514, A073513, A073512, A073511, A073510, A073509.

Programs

  • Mathematica
    f[n_] := f[n] = PrimePi[2*10^n] - PrimePi[10^n] + f[n - 1]; f[0] = 0; Table[ f[n], {n, 0, 13}]
  • PARI
    a(n,d=1)=sum(k=0, n-1, primepi((d+1)*10^k-1) - primepi(d*10^k-1)) \\ Andrew Howroyd, Dec 15 2024

Formula

a(n) = Sum_{k=0..n-1} pi(2*10^k-1) - pi(10^k-1). - Andrew Howroyd, Dec 15 2024

Extensions

Edited and extended by Robert G. Wilson v, Aug 29 2002
a(21)-a(22) added by David Baugh, Mar 21 2015
a(23) from Chai Wah Wu, Sep 18 2018
Offset corrected by Andrew Howroyd, Dec 15 2024

A073509 Number of primes less than 10^n with initial digit 9.

Original entry on oeis.org

0, 1, 15, 127, 1006, 8230, 70320, 614821, 5453140, 48982456, 444608278, 4070532710, 37535715441, 348245215460, 3247889171908, 30429496751905, 286235215995588, 2702000272361599, 25586688305447928, 242978340446949438, 2313264023790027111, 22074118786158858975
Offset: 1

Views

Author

Shyam Sunder Gupta, Aug 14 2002

Keywords

Examples

			a(2) = 1 because there is 1 prime less than 100 whose initial digit is 9, i.e., 97.
		

Crossrefs

A006880(n) = A073509(n)+ ... + A073516(n)+A073517(n-1).
For primes with initial digit d (1 <= d <= 9) see A045707, A045708, A045709, A045710, A045711, A045712, A045713, A045714, A045715; A073517, A073516, A073515, A073514, A073513, A073512, A073511, A073510, A073509

Programs

  • Mathematica
    f[n_] := f[n] = PrimePi[10^(n + 1)] - PrimePi[9*10^n] + f[n - 1]; f[0] = 0; Table[f[n], {n, 0, 12}]

Extensions

Edited and extended by Robert G. Wilson v, Aug 29 2002
a(20)-a(22) added by David Baugh, Mar 22 2015

A073510 Number of primes less than 10^n with initial digit 8.

Original entry on oeis.org

0, 2, 17, 127, 1003, 8326, 71038, 618610, 5481646, 49221187, 446590932, 4087194991, 37677478288, 349465615584, 3258501713644, 30522628848972, 287059041039078, 2709339704446862, 25652489700275636, 243571629996128384, 2318640708958531064, 22123070798400775157
Offset: 1

Views

Author

Shyam Sunder Gupta, Aug 14 2002

Keywords

Examples

			a(2)=2 because there are 2 primes up to 10^2 whose initial digit is 8 (namely 83 and 89).
		

Crossrefs

A006880(n) = A073509(n)+ ... + A073516(n)+A073517(n-1).
For primes with initial digit d (1 <= d <= 9) see A045707, A045708, A045709, A045710, A045711, A045712, A045713, A045714, A045715; A073517, A073516, A073515, A073514, A073513, A073512, A073511, A073510, A073509

Programs

  • Mathematica
    f[n_] := f[n] = PrimePi[9*10^n] - PrimePi[8*10^n] + f[n - 1]; f[0] = 0; Table[ f[n], {n, 0, 12}]

Extensions

Edited and extended by Robert G. Wilson v, Aug 29 2002
a(20)-a(22) added by David Baugh, Mar 22 2015

A073511 Number of primes less than 10^n with initial digit 7.

Original entry on oeis.org

1, 4, 18, 125, 1027, 8435, 71564, 622882, 5516130, 49495432, 448855139, 4106164356, 37838546363, 350849788546, 3270531245684, 30628143485953, 287992070079777, 2717649138419586, 25726964404879666, 244242934202964444, 2324722877951987037, 22178433287546997612
Offset: 1

Views

Author

Shyam Sunder Gupta, Aug 14 2002

Keywords

Examples

			a(2)=4 because there are 4 primes up to 10^2 whose initial digit is 7 (namely 7, 71, 73 and 79).
		

Crossrefs

Cf. A073509 to A073517, their sum is A006880.
For primes with initial digit d (1 <= d <= 9) see A045707, A045708, A045709, A045710, A045711, A045712, A045713, A045714, A045715; A073517, A073516, A073515, A073514, A073513, A073512, A073511, A073510, A073509

Programs

  • Mathematica
    f[n_] := f[n] = PrimePi[8*10^n] - PrimePi[7*10^n] + f[n - 1]; f[0] = 1; Table[ f[n], {n, 0, 12}]

Extensions

Edited and extended by Robert G. Wilson v, Aug 29 2002
a(20)-a(22) added by David Baugh, Mar 22 2015

A073512 Number of primes less than 10^n with initial digit 6.

Original entry on oeis.org

0, 2, 18, 135, 1013, 8458, 72257, 628206, 5556434, 49815418, 451476802, 4128049326, 38024311091, 352446754137, 3284400373590, 30749731897370, 289066731934716, 2727216210298152, 25812680778645432, 245015325044029789, 2331718909954888809, 22242097596092999144
Offset: 1

Views

Author

Shyam Sunder Gupta, Aug 14 2002

Keywords

Examples

			a(2)=2 because there are 2 primes up to 10^2 whose initial digit is 2 (namely 61 and 67).
		

Crossrefs

Cf. A073509 to A073517, their sum is A006880.
For primes with initial digit d (1 <= d <= 9) see A045707, A045708, A045709, A045710, A045711, A045712, A045713, A045714, A045715; A073517, A073516, A073515, A073514, A073513, A073512, A073511, A073510, A073509

Programs

  • Mathematica
    f[n_] := f[n] = PrimePi[7*10^n] - PrimePi[6*10^n] + f[n - 1]; f[0] = 0; Table[ f[n], {n, 0, 12}]

Extensions

Edited and extended by Robert G. Wilson v, Aug 29 2002
a(20)-a(22) added by David Baugh, Mar 22 2015

A073513 Number of primes less than 10^n with initial digit 5.

Original entry on oeis.org

1, 3, 17, 131, 1055, 8615, 72951, 633932, 5602768, 50193913, 454577490, 4153943134, 38243708524, 354330372215, 3300752009165, 30892997367352, 290332329192655, 2738477783884855, 25913537508233527, 245923809778144431, 2339944887042508496, 22316931815316988517
Offset: 1

Views

Author

Shyam Sunder Gupta, Aug 14 2002

Keywords

Examples

			a(2)=3 because there are 3 primes up to 10^2 whose initial digit is 5 (namely 5, 53 and 59).
		

Crossrefs

Cf. A073509 to A073517, their sum is A006880.
For primes with initial digit d (1 <= d <= 9) see A045707, A045708, A045709, A045710, A045711, A045712, A045713, A045714, A045715; A073517, A073516, A073515, A073514, A073513, A073512, A073511, A073510, A073509

Programs

  • Mathematica
    f[n_] := f[n] = PrimePi[6*10^n] - PrimePi[5*10^n] + f[n - 1]; f[0] = 1; Table[ f[n], {n, 0, 13}]

Extensions

Edited and extended by Robert G. Wilson v, Aug 29 2002
a(20)-a(22) added by David Baugh, Mar 22 2015
Previous Showing 11-20 of 233 results. Next