OFFSET
1,2
COMMENTS
a(3n) = 0.
LINKS
Robert Israel, Table of n, a(n) for n = 1..168
MAPLE
g:= proc(L) local i, m;
m:= -1;
for i from 1 do
if L[i] = 1 then
if m = -1 then m:= i fi;
if L[i+1] = 0 then
return [1$(i-m), 0$(m-1), 0, 1, op(L[i+2..-1])]
fi
fi
od
end proc:
f:= proc(n) local L, x, pn, i;
if n mod 3 = 0 then return 0 fi;
pn:= ithprime(n);
L:= [1$(n-1), 0$(pn-n), 1];
do
x:= add(L[i]*10^(i-1), i=1..pn);
if isprime(x) then return x fi;
L:= g(L);
od
end proc:
map(f, [$1..16]); # Robert Israel, Feb 01 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Lekraj Beedassy, Nov 30 2009
EXTENSIONS
Extended by Ray Chandler, Dec 03 2009
STATUS
approved