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 30 results. Next

A091641 Number of primes less than 10^n which do not contain the digit 7.

Original entry on oeis.org

3, 16, 100, 680, 4773, 34992, 266823, 2079512, 16503238, 132852644, 1081509855, 8885472675, 73563855306, 612982476612
Offset: 1

Views

Author

Enoch Haga, Jan 30 2004

Keywords

Comments

Number of primes less than 10^n after removing any primes with at least one digit 7.

Examples

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

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], 7] == {}, c++ ]]; Print[c]; p--, {n, 1, 8}] (* Robert G. Wilson v, Feb 02 2004 *)
  • Python
    from sympy import primerange
    def a(n): return sum('7' not in str(p) for p in primerange(2, 10**n))
    print([a(n) for n in range(1, 7)]) # Michael S. Branicky, Mar 16 2021

Formula

a(n) = A006880(n) - A091708(n).

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

A091642 Number of primes less than 10^n which do not contain the digit 8.

Original entry on oeis.org

4, 23, 141, 915, 6375, 46799, 355805, 2774348, 22023132, 177273427, 1443074791, 11855541525, 98146301284, 817786989282
Offset: 1

Views

Author

Enoch Haga, Jan 30 2004

Keywords

Examples

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

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], 8] == {}, c++ ]]; Print[c]; p--, {n, 1, 8}] (* Robert G. Wilson v, Feb 02 2004 *)
  • Python
    from sympy import sieve # use slower primerange for larger terms
    def a(n): return sum('8' not in str(p) for p in sieve.primerange(2, 10**n))
    print([a(n) for n in range(1, 8)]) # Michael S. Branicky, Apr 23 2021

Formula

Number of primes less than 10^n after removing any primes with at least one digit 8.
a(n) = A006880(n) - A091709(n).

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

A091644 Number of primes less than 10^n which have at least one digit 0.

Original entry on oeis.org

0, 0, 15, 219, 2470, 26185, 266713, 2658107, 26198216, 256516296, 2501246232, 24320647270, 236032108530, 2287868820615
Offset: 1

Views

Author

Enoch Haga, Jan 30 2004

Keywords

Comments

3 additional terms, generated using a sieve program. - Ryan Propper, Aug 20 2005

Examples

			a(3) = 15 because of the 168 primes less than 10^3, 15 have at least one 0 digit.
		

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 *)
  • Python
    from sympy import sieve # use primerange for larger terms
    def digs0(n): return '0' in str(n)
    def aupton(terms):
      ps, alst = 0, []
      for n in range(1, terms+1):
        ps += sum(digs0(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

a(n) = A006880(n) - A091634(n).

Extensions

Edited and extended by Robert G. Wilson v, Feb 02 2004
More terms from Ryan Propper, Aug 20 2005
a(13) from Robert Price, Nov 11 2013
a(14) from Giovanni Resta, Jul 21 2015

A231726 Count of the first 10^n primes containing at least one 0's digit.

Original entry on oeis.org

0, 9, 181, 2878, 38298, 442776, 4937680, 54997237, 604120810, 6420599395, 67512632285
Offset: 1

Views

Author

Robert Price, Nov 12 2013

Keywords

Examples

			a(2)=9 because there are 9 primes not greater than 547 (the 100th prime) that contain a zero digit.  Namely: 101, 103, 107, 109, 307, 401, 409, 503, 509.
		

Crossrefs

Programs

  • Mathematica
    cnt = 0; Table[Do[p = Prime[k]; If[MemberQ[IntegerDigits[p], 0], cnt++], {k, 10^(n - 1) + 1, 10^n}]; cnt, {n, 5}] (* T. D. Noe, Nov 13 2013 *)

Formula

a(n) ~ 10^n. - Charles R Greathouse IV, May 21 2014

A231790 Count of the first 10^n primes containing at least one 4's digit.

Original entry on oeis.org

0, 25, 279, 3363, 39395, 485191, 5269618, 56745409, 607655311, 6578438247, 68950399755
Offset: 1

Views

Author

Robert Price, Nov 13 2013

Keywords

Examples

			a(2)=25 because there are 25 primes not greater than 541 (the 100th prime) that contain a 4's digit.  Namely: 41, 43, 47, 149, 241, 347, 349, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 541.
		

Crossrefs

Programs

  • Mathematica
    cnt = 0; Table[Do[p = Prime[k]; If[MemberQ[IntegerDigits[p], 4], cnt++], {k, 10^(n - 1) + 1, 10^n}]; cnt, {n, 5}] (* T. D. Noe, Nov 13 2013 *)

Formula

a(n) ~ 10^n. - Charles R Greathouse IV, May 21 2014

A231792 Count of the first 10^n primes containing at least one 5's digit.

Original entry on oeis.org

1, 15, 292, 3365, 39360, 464466, 5262871, 56702805, 607358478, 6463119473, 68932485429
Offset: 1

Views

Author

Robert Price, Nov 13 2013

Keywords

Examples

			a(2)=15 because there are 15 primes not greater than 541 (the 100th prime) that contain a 5's digit.  Namely: 5, 53 59, 151, 157, 251, 257,  353, 359, 457, 503, 509, 521, 523, 541.
		

Crossrefs

Programs

  • Mathematica
    cnt = 0; Table[Do[p = Prime[k]; If[MemberQ[IntegerDigits[p], 5], cnt++], {k, 10^(n - 1) + 1, 10^n}]; cnt, {n, 5}] (* T. D. Noe, Nov 13 2013 *)

Formula

a(n) ~ 10^n. - Charles R Greathouse IV, May 21 2014

A231796 Count of the first 10^n primes containing at least one 9's digit.

Original entry on oeis.org

2, 31, 380, 4990, 54268, 581858, 6214940, 67420394, 703398930, 7316745778, 75645891943
Offset: 1

Views

Author

Robert Price, Nov 13 2013

Keywords

Examples

			a(2)=31 because there are 31 primes not greater than 541 (the 100th prime) that contain a 9's digit.  Namely: 19, 29, 59, 79, 89, 97, 109, 139, 149, 179, 191, 193, 197, 199, 229, 239, 269, 293, 349, 359, 379, 389, 397, 409, 419, 439, 449, 479, 491, 499, 509.
		

Crossrefs

Programs

  • Mathematica
    cnt = 0; Table[Do[p = Prime[k]; If[MemberQ[IntegerDigits[p], 9], cnt++], {k, 10^(n - 1) + 1, 10^n}]; cnt, {n, 5}] (* T. D. Noe, Nov 13 2013 *)

Formula

a(n) ~ 10^n. - Charles R Greathouse IV, May 21 2014

A228414 Count of the first 10^n primes which do not contain the digit 2.

Original entry on oeis.org

0, 7, 77, 697, 6497, 55552, 512100, 4710641, 42205969, 341224891, 2787791578, 22971326749, 190650687957
Offset: 0

Views

Author

Robert Price, Nov 09 2013

Keywords

Examples

			a(1) = 7 since there are 7 primes less than 29 (the 10th prime) that do not contain a 2.  Namely: 3, 5, 7, 11, 13, 17, 19.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Range[10^n], DigitCount[Prime[#], 10, 2] == 0 &]], {n, 0, 5}] (* Robert Price, Mar 23 2020 *)

Formula

a(n) < 9^n. - Charles R Greathouse IV, May 21 2014

Extensions

a(12) from Lucas A. Brown, Mar 19 2024

A228415 Count of the first 10^n primes which do not contain the digit 3.

Original entry on oeis.org

1, 7, 54, 534, 4909, 45405, 385008, 3539880, 32260781, 294001190, 2564080248, 23271246324, 211753431947
Offset: 0

Views

Author

Robert Price, Nov 09 2013

Keywords

Examples

			a(1) = 7 since there are 7 primes in the first 10 (through 29) that do not contain a 3.  Namely: 2, 5, 7, 11, 17, 19, 29.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Range[10^n], DigitCount[Prime[#], 10, 3] == 0 &]], {n, 0, 5}] (* Robert Price, Mar 23 2020 *)

Formula

a(n) <= 9^n. - Charles R Greathouse IV, May 21 2014

Extensions

a(12) from Lucas A. Brown, Mar 19 2024

A228416 Count of the first 10^n primes which do not contain the digit 4.

Original entry on oeis.org

1, 10, 75, 721, 6637, 60605, 514809, 4730382, 43254591, 392344689, 3421561753, 31049600245, 282499317912
Offset: 0

Views

Author

Robert Price, Nov 09 2013

Keywords

Examples

			a(1) = 10 since there are 10 primes in the first 10 (through 29) that do not contain a 4.  Namely: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Range[10^n], DigitCount[Prime[#], 10, 4] == 0 &]], {n, 0, 5}] (* Robert Price, Mar 23 2020 *)

Formula

a(n) <= 9^n. - Charles R Greathouse IV, May 21 2014

Extensions

a(12) from Lucas A. Brown, Mar 19 2024
Previous Showing 11-20 of 30 results. Next