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 10 results.

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

A091635 Number of primes less than 10^n which do not contain the digit 1.

Original entry on oeis.org

4, 17, 101, 670, 4675, 34425, 262549, 2051466, 16312743, 131464721, 1071368863, 8809580516, 72986908554, 608542410004
Offset: 1

Views

Author

Enoch Haga, Jan 30 2004

Keywords

Examples

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

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

Formula

Number of primes less than 10^n after removing any primes with at least one digit 1.
a(n) = A006880(n) - A091645(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

A091636 Number of primes less than 10^n which do not contain the digit 2.

Original entry on oeis.org

3, 22, 139, 877, 6235, 46105, 352155, 2747284, 21831323, 175881412, 1432781905, 11778245565, 97558533214, 813253056497
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 2.

Examples

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

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

Formula

a(n) = A006880(n) - A091646(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

A091637 Number of primes less than 10^n which do not contain the digit 3.

Original entry on oeis.org

3, 16, 102, 668, 4715, 34813, 265015, 2067152, 16413535, 132200223, 1076692515, 8849480283, 73288053795, 610860050965
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 3.

Examples

			a(2)=16 because there are 25 primes less than 10^2, 9 have at least one digit 3; 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], 3] == {}, c++ ]]; Print[c]; p--, {n, 1, 8}] (* Robert G. Wilson v, Feb 02 2004 *)
    Table[Count[Prime[Range[PrimePi[10^n]]],?(DigitCount[#,10,3]==0&)],{n,8}] (* _Harvey P. Dale, Oct 04 2011 *)
  • PARI
    good(n)=n=eval(Vec(Str(n)));for(i=1,#n,if(n[i]==3,return(1)));0
    a(n)=my(s);forprime(p=2,10^n,s+=good(p));s \\ Charles R Greathouse IV, Oct 04 2011
    
  • Python
    from sympy import primerange
    def a(n): return sum('3' 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) - A091647(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

A091639 Number of primes less than 10^n which do not contain the digit 5.

Original entry on oeis.org

3, 22, 136, 905, 6310, 46549, 354910, 2765749, 21955845, 176781643, 1439380189, 11827571824, 97933795005, 816144146010
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 5.

Examples

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

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

Formula

a(n) = A006880(n) - A091706(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

A091640 Number of primes less than 10^n which do not contain the digit 6.

Original entry on oeis.org

4, 23, 136, 897, 6367, 46706, 355148, 2770239, 21984207, 176966593, 1440765209, 11838096715, 98014747908, 816769206831
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 6; 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], 6] == {}, 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('6' 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 6.
a(n) = A006880(n) - A091707(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

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

A091705 Number of primes less than 10^n having at least one digit 4.

Original entry on oeis.org

0, 3, 32, 326, 3231, 31953, 310456, 3000349, 28922364, 278508004, 2680391313, 25793058269, 248228108241, 2389543008906
Offset: 1

Views

Author

Enoch Haga, Jan 30 2004

Keywords

Examples

			a(2) = 3 because of the 25 primes less than 10^2, 3 have at least one digit 4.
		

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], 4] != {}, c++ ]]; Print[c]; p--, {n, 1, 8}] (* Robert G. Wilson v, Feb 02 2004 *)

Extensions

Edited and extended by Robert G. Wilson v, Feb 02 2004
3 more terms from Ryan Propper, Aug 21 2005
a(13) from Robert Price, Nov 11 2013
a(14) from Giovanni Resta, Jul 21 2015
Showing 1-10 of 10 results.