A108848 Palindromic primes in which all internal digits are 9.
191, 797, 19991, 79997, 199999991, 79999999999999999999999999997, 19999999999999999999999999999999999999991, 199999999999999999999999999999999999999999999999999999999999999999999999999999999999991
Offset: 1
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..13
Crossrefs
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
Comments