A108846 Palindromic primes in which all internal digits are 2.
727, 929, 72227, 3222223, 9222229, 322222223, 722222227, 9222222222229, 72222222222222222222222222227, 72222222222222222222222222222222222222222222222222222222222222227
Offset: 1
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..13
Crossrefs
Programs
-
Mathematica
Select[Flatten[Table[10 FromDigits[PadRight[{d},n,2]]+d,{d,{1,3,7,9}},{n,2,70}]],PrimeQ]//Sort (* Harvey P. Dale, Feb 05 2023 *)
-
PARI
n10np1(n,d) = { local(x,y,k); for(x=1,n, for(k=1,9, 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 "1379" if isprime(t:=int(f + "2"*i + f))) print(list(islice(agen(), 10))) # Michael S. Branicky, Jan 27 2023
Extensions
Name changed by Arkadiusz Wesolowski, Sep 07 2011
Comments