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

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

A228413 Count of the first 10^n primes which do not contain the digit 1.

Original entry on oeis.org

1, 6, 54, 532, 4675, 34425, 262549, 2051466, 16831152, 155616459, 1529462564, 14830618421, 141585123501
Offset: 0

Views

Author

Robert Price, Nov 09 2013

Keywords

Examples

			a(2) = 54 since there are 54 primes less than 541 (the 100th prime) that do not contain a 1.  Namely: 2, 3, 5, 7, 23, 29, ..., 523.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Range[10^n], DigitCount[Prime[#], 10, 1] == 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

A228421 Count of the first 10^n primes which do not contain the digit 9.

Original entry on oeis.org

1, 8, 69, 620, 5010, 45732, 418142, 3785060, 32579606, 296601070, 2683254222, 24354108057, 212324183352
Offset: 0

Views

Author

Robert Price, Nov 09 2013

Keywords

Examples

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

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Range[10^n], DigitCount[Prime[#], 10, 9] == 0 &]], {n, 0, 5}] (* Robert Price, Mar 23 2020 *)
  • Python
    def a(n):
        count = 0
        for k in range(1,10**n+1):
            if '9' not in str(prime(k)):
                count += 1
        return count
    n = 0
    while n < 10:
        print(a(n), end=', ')
        n += 1
    # Derek Orr, Jul 27 2014

Formula

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

Extensions

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

A231412 Count of the first 10^n primes which do not contain the digit 0.

Original entry on oeis.org

1, 10, 91, 819, 7122, 61702, 557224, 5062320, 45002763, 395879190, 3579400605, 32487367715, 294505958253
Offset: 0

Views

Author

Robert Price, Nov 08 2013

Keywords

Examples

			a(2) = 91 = 100-9 since only 9 primes less than 541 (the 100th prime) contain a zero.  Namely: 101, 103, 107, 109, 307, 401, 409, 503, 509.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Range[10^n], DigitCount[Prime[#], 10, 0] == 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

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

A091638 Number of primes less than 10^n which do not contain the digit 4.

Original entry on oeis.org

4, 22, 136, 903, 6361, 46545, 354123, 2761106, 21925170, 176544507, 1437663500, 11814853749, 97837428598, 815398741896
Offset: 1

Views

Author

Enoch Haga, Jan 30 2004

Keywords

Examples

			a(2) = 22 because of the 25 primes less than 10^2, 3 have at least one digit 4; 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], 4] == {}, 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 4.
a(n) = A006880(n) - A091705(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
Showing 1-10 of 30 results. Next