|
|
A327464
|
|
a(1) = 1; thereafter, a(n) is the reversal of the next prime after a(n - 1) in base 5 if n is prime, and the reversal of the next composite after a(n - 1) in base 5 if n is composite.
|
|
3
|
|
|
1, 2, 3, 4, 1, 4, 1, 4, 6, 16, 13, 22, 19, 4, 6, 16, 13, 22, 19, 4, 6, 16, 13, 22, 24, 1, 4, 6, 11, 12, 17, 18, 4, 6, 16, 18, 23, 24, 1, 4, 1, 4, 1, 4, 6, 16, 13, 22, 24, 1, 4, 6, 11, 12, 22, 24, 1, 4, 1, 4, 1, 4, 6, 16, 18, 4, 1, 4, 6, 16, 13, 22, 19, 4, 6, 16, 18, 4, 1, 4, 6, 16, 13, 22, 24
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
The sequence is written in base 10.
Conjecture: the maximal value is 107, first attained at n = 883.
|
|
LINKS
|
|
|
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:
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|