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.

A108848 Palindromic primes in which all internal digits are 9.

Original entry on oeis.org

191, 797, 19991, 79997, 199999991, 79999999999999999999999999997, 19999999999999999999999999999999999999991, 199999999999999999999999999999999999999999999999999999999999999999999999999999999999991
Offset: 1

Views

Author

Cino Hilliard, Jul 11 2005

Keywords

Comments

Obviously, 1 and 7 are the only possible outer digits for repeating inner digit 9.
Terms a(14), a(15), and a(16) have respectively 1213, 1285, and 1461 digits. - Harvey P. Dale, Dec 11 2019

Crossrefs

Similar sequences for digit d: A108845 (d=1), A108846 (d=2), A108841 (d=4), A108842 (d=5), A108843 (d=6), A108844 (d=7), A108847 (d=8), A108848 (d=9).

Programs

  • Mathematica
    Select[Flatten[Table[FromDigits[PadRight[{k},n,9]]*10+k,{n,2,200},{k,{1,7}}]],PrimeQ] (* Harvey P. Dale, Dec 11 2019 *)
  • PARI
    n10np9(n,d) = { local(x,y,k); for(x=1,n, for(k=1,9, y=10^(x+1)*k+(10^x-1)*10+k; if(isprime(y),print1(y",")) ) ) }
    
  • Python
    from sympy import isprime
    from itertools import count, islice
    def agen(): yield from (t for i in count(1) for f in "17" if isprime(t:=int(f + "9"*i + f)))
    print(list(islice(agen(), 13))) # Michael S. Branicky, Jan 27 2023

Extensions

Name changed by Arkadiusz Wesolowski, Sep 07 2011
More terms from Harvey P. Dale, Dec 11 2019