Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #30 Sep 14 2019 17:51:56
%S 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,
%T 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,
%U 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
%N 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.
%C The sequence is written in base 10.
%C _Rémy Sigrist_'s argument from A326344 gives an upper bound of 23, although the true maximum value is 20, as confirmed by _Andrew Weimholt_'s argument from A326344.
%H N. J. A. Sloane, <a href="/A326894/b326894.txt">Table of n, a(n) for n = 1..20000</a>
%H Robert Dougherty-Bliss, <a href="/A326894/a326894.txt">Proof that A326894 is bounded with maximum value 20</a>
%e 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.
%Y Cf. A326344, A326892, A151800, A113646.
%K nonn,base
%O 1,2
%A _Robert Dougherty-Bliss_, Sep 13 2019
%E Corrected by _N. J. A. Sloane_, Sep 13 2019