A108843 Palindromic primes in which all internal digits are 6.
16661, 76667, 7666667, 1666666666661, 16666666666666661, 1666666666666666661, 1666666666666666666666666666666666661, 16666666666666666666666666666666666666666666666666661
Offset: 1
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..14
Crossrefs
Programs
-
Mathematica
nn=80;With[{o=Table[FromDigits[Join[PadRight[{1},n,6],{1}]],{n,3,nn}], s= Table[ FromDigits[Join[PadRight[{7},n,6],{7}]],{n,3,nn}]}, Select[ Sort[ Join[o,s]],PrimeQ]] (* Harvey P. Dale, May 26 2014 *)
-
PARI
n10np1(n,d) = { local(x,y,k); for(x=1,n, for(k=1,8, y=10^(x+1)*k+floor(10^x*d/9)*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 + "6"*i + f))) print(list(islice(agen(), 10))) # Michael S. Branicky, Jan 27 2023
Extensions
Name changed by Arkadiusz Wesolowski, Sep 07 2011
Comments