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.

A020472 Primes that contain digits 8 and 9 only.

Original entry on oeis.org

89, 8999, 89899, 89989, 98899, 98999, 99989, 888989, 898889, 989999, 998989, 8888989, 8889889, 8988989, 8989999, 8998889, 8999899, 9888889, 9889889, 9899999, 9989899, 9999889, 88888999, 88898989, 88989899, 89888989, 89889889, 89898889, 89999999, 98888989
Offset: 1

Views

Author

Keywords

Comments

Or, primes with minimal digit 8.

Crossrefs

Cf. A020449 (digits 0 & 1), ..., A020471 (digits 7 & 9). - M. F. Hasler, Mar 18 2010

Programs

  • Mathematica
    Select[Prime[Range[80000]], Min[IntegerDigits[#]] == 8 &] (* Zak Seidov, May 07 2005 *)
    Flatten[Table[Select[FromDigits/@Tuples[{8, 9}, n], PrimeQ], {n, 8}]] (* Vincenzo Librandi, Jul 27 2012 *)
  • PARI
    for(nd=1,9, p=vector(nd,i,10^(nd-i))~; forvec(v=vector(nd,i,[8+(i==nd),9]), isprime(v*p) && print1(v*p","))) \\ M. F. Hasler, Mar 18 2010
    
  • Python
    from sympy import isprime
    from itertools import count, islice, product
    def agen(): # generator of terms
        for d in count(2):
            for first in product("89", repeat=d-1):
                t = int("".join(first) + "9")
                if isprime(t): yield t
    print(list(islice(agen(), 30))) # Michael S. Branicky, Nov 15 2022

Extensions

Edited by N. J. A. Sloane, Jan 26 2008 at the suggestion of Lekraj Beedassy