

A326894


a(1) = 1; thereafter, a(n) is the reversal of the next prime after a(n  1) in base 3 if n is prime, and the reversal of the next composite after a(n  1) in base 3 if n is composite.


6



1, 2, 1, 4, 7, 8, 19, 20, 5, 2, 1, 4, 7, 8, 1, 4, 7, 8, 19, 20, 5, 2, 1, 4, 2, 4, 2, 4, 7, 8, 19, 20, 5, 2, 4, 2, 1, 4, 2, 4, 7, 8, 19, 20, 5, 2, 1, 4, 2, 4, 2, 4, 7, 8, 1, 4, 2, 4, 7, 8, 19, 20, 5, 2, 4, 2, 1, 4, 2, 4, 7, 8, 19, 20, 5, 2, 4, 2, 1, 4, 2, 4, 7, 8, 1, 4, 2, 4, 7, 8, 1, 4, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

The sequence is written in base 10.


LINKS



EXAMPLE

By definition, a(1) = 1. The next composite after a(3) = 1 is 4, or 11 in base 3. Reversed this is still 11 in base 3, or 4 in base 10. Thus a(4) = 4 since 4 is composite.


CROSSREFS



KEYWORD

nonn,base


AUTHOR



EXTENSIONS



STATUS

approved



