OFFSET
1,2
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
MATHEMATICA
prQ[n_] := n == 1 || PrimeQ[n];
okQ[n_] := Module[{dd = IntegerDigits[n]}, AllTrue[Range[Length[dd]-1], prQ@ FromDigits@ Drop[dd, #]&]];
{1}~Join~Select[ Prime@Range[1000], okQ] (* Jean-François Alcover, Nov 20 2019 *)
PROG
(PARI) is(n)=my(d=digits(n, 10)); for(i=1, #d-1, if(!isprime(fromdigits(d[i..#d], 10)), return(0))); isprime(d[#d]) || d[#d]==1 \\ Charles R Greathouse IV, Nov 26 2016
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Aug 13 2008
STATUS
approved