OFFSET
1,1
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..10000
EXAMPLE
n=222 -> previous prime is 211, thus '211222211' is a prime.
MATHEMATICA
okQ[n_] := Module[{idppn=IntegerDigits[NextPrime[n, -1]]}, PrimeQ[FromDigits[Join[idppn, IntegerDigits[n], idppn]]]]; Select[Range[350], okQ] (* Harvey P. Dale, Jan 07 2011 *)
PROG
(PARI) isok(n)=my(x=digits(precprime(n-1))); n>2 && isprime(fromdigits(concat([x, digits(n), x]))) \\ Andrew Howroyd, Aug 13 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Oct 15 1998
EXTENSIONS
Offset changed by Andrew Howroyd, Aug 13 2024
STATUS
approved