OFFSET
1,1
COMMENTS
a(15) > 50000. - Robert Price, Nov 09 2018
MAPLE
rev:= proc(n) local i, L;
L:= convert(n, base, 10);
add(L[-i]*10^(i-1), i=1..nops(L))
end proc:
A[0]:= 0: A[1]:= 0: A[2]:= 1:
RA[0]:=0: RA[1]:= 0: RA[2]:= 1:
count:= 0:
for n from 3 to 10000 do
A[n]:= RA[n-1]+RA[n-2]+RA[n-3];
RA[n]:= rev(A[n]);
if isprime(A[n]) then count:= count+1; a[count]:= n fi
od:
seq(a[i], i=1..count); # Robert Israel, Aug 04 2016
MATHEMATICA
Flatten[Position[Transpose[NestList[nxt, {0, 0, 1}, 1700]][[1]], _?PrimeQ]]-1 (* Harvey P. Dale, Nov 28 2015 *)
CROSSREFS
KEYWORD
nonn,more,base
AUTHOR
Jonathan Vos Post and Ray Chandler, Dec 31 2004
EXTENSIONS
a(11)-a(13) from Robert Israel, Aug 04 2016
a(14) from Robert Price, Nov 09 2018
STATUS
approved