OFFSET
1,2
COMMENTS
The sequence is written in base 10.
Conjecture: the maximal value is 107, first attained at n = 883.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
digrev:= proc(n) local L, i;
L:= convert(n, base, 5);
add(L[-i]*5^(i-1), i=1..nops(L))
end proc:
nextcomp:= proc(n) local m;
for m from n+1 do if not isprime(m) then return m fi od
end proc:
A[1]:= 1:
for n from 2 to 100 do
if isprime(n) then A[n]:= digrev(nextprime(A[n-1]))
else A[n]:= digrev(nextcomp(A[n-1]))
fi
od:
seq(A[i], i=1..100); # Robert Israel, Sep 28 2019
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Sep 27 2019
STATUS
approved