OFFSET
1,1
LINKS
Pierre CAMI, Table of n, a(n) for n = 1..10000
EXAMPLE
313, 353, 373 as 383 are prime numbers so a(1)=3.
727, 757, 787 as 797 are prime numbers so a(2)=7.
MATHEMATICA
Select[Prime[Range[100]], AnyTrue[FromDigits/@Table[Join[ IntegerDigits[ #], {n}, IntegerDigits[#]], {n, 9}], PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 21 2016 *)
PROG
(PFGW & SCRIPT), pre10.txt file with the first 10000000 prime numbers.
SCRIPT
DIM i, 0
DIM j
DIM k
DIM n, 1
DIM o
OPENFILEOUT myf, a(n).txt
OPENFILEIN maf, pre10.txt
GETNEXT j, maf
LABEL loop1
GETNEXT j, maf
IF j>10^n THEN SET n, n+1
SET o, 0
LABEL loop2
SET o, o+1
IF o>9 THEN GOTO loop1
SET k, j*10^(n+1)+o*10^n+j
PRP k
IF ISPRP THEN GOTO w
GOTO loop2
LABEL w
SET i, i+1
WRITE myf, j
IF i>9999 THEN END
GOTO loop1
(PARI) lista(nn) = {forprime(p=2, nn, len = #Str(p); if (sum(i=1, 9, isprime(p+(10*p+i)*10^len)), print1(p, ", ")); ); } \\ Michel Marcus, Oct 28 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Pierre CAMI, Oct 27 2014
STATUS
approved