Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #12 Apr 04 2019 22:49:09
%S 2,1,0,2,2,2,1,0,2,2,1,2,2,0,1,0,2,2,2,2,1,2,2,1,0,1,2,0,2,2,2,2,2,1,
%T 2,2,0,1,0,1,1,2,0,2,2,0,2,2,2,2,1,2,2,2,0,1,0,1,2,1,2,2,1,0,2,2,2,2,
%U 0,2,2,1,2,2,0,1,2,2,1,2,0,0,1,2,1,0,2,2,2,1,2,2,2,1,0,2,2,2,2,2,2,0,2,2,1,1,2,2,2,0,1,2
%N A fractal ternary sequence: For all n >= 1, underline the term with index n + a(n) + 1; then the two subsequences of underlined terms and of non-underlined terms are both equal to the sequence itself.
%C This is defined to be the lexicographically earliest ternary sequence with the following property:
%C If a(n) = 0, underline a(n+1); if a(n) = 1, underline a(n+2) ; if a(n) = 2, underline a(n+3). Now, the subsequence of (once or more) underlined terms must be equal to the original sequence (copy #1), and the subsequence of non-underlined terms must also reproduce the original sequence (copy #2).
%H Carole Dubois, <a href="/A307332/b307332.txt">Table of n, a(n) for n = 1..2001</a>
%e The sequence starts (2, 1, 0, 2, 2, 2, 1, 0, 2, 2, 1, 2, 2, 0, 1, 0,...)
%e Instead of underlining terms, we will put parentheses around the terms we want to emphasize:
%e a(1) = 2 produces parentheses around a(1 + 3 = 4):
%e 2, 1, 0, (2), 2, 2, 1, 0, 2, 2, 1, 2, 2, 0, 1, 0,...
%e a(2) = 1 produces parentheses around a(2 + 2 = 4), which is now already done. Then,
%e a(3) = 0 produces parentheses around a(3 + 1 = 4), which is already done. Then,
%e a(4) = 2 produces parentheses around a(4 + 3 = 7):
%e 2, 1, 0, (2), 2, 2, (1), 0, 2, 2, 1, 2, 2, 0, 1, 0,...
%e a(5) = 2 produces parentheses around a(5 + 3 = 8):
%e 2, 1, 0, (2), 2, 2, (1), (0), 2, 2, 1, 2, 2, 0, 1, 0,...
%e a(6) = 2 produces parentheses around a(6 + 3 = 9):
%e 2, 1, 0, (2), 2, 2, (1), (0), (2), 2, 1, 2, 2, 0, 1, 0,...
%e a(7) = 1 produces parentheses around a(7 + 2 = 9), which is already done. Then,
%e a(8) = 0 produces parentheses around a(8 + 1 = 9) - already done. Then,
%e a(9) = 2 produces parentheses around a(9 + 3 = 12):
%e 2, 1, 0, (2), 2, 2, (1), (0), (2), 2, 1, (2), 2, 0, 1, 0,...
%e a(10) = 2 produces parentheses around a(10 + 3 = 13):
%e 2, 1, 0, (2), 2, 2, (1), (0), (2), 2, 1, (2), (2), 0, 1, 0,...
%e a(11) = 1 produces parentheses around a(11 + 2 = 13) - already done. Then,
%e a(12) = 2 produces parentheses around a(12 + 3 = 15):
%e 2, 1, 0, (2), 2, 2, (1), (0), (2), 2, 1, (2), (2), 0, (1), 0,...
%e a(13) = 2 produces parentheses around a(13 + 3 = 16):
%e 2, 1, 0, (2), 2, 2, (1), (0), (2), 2, 1, (2), (2), 0, (1), (0),... and so on.
%e We see in this small example that the parenthesized terms reproduce the initial sequence:
%e (2),(1),(0),(2),(2),(2),(1),(0),...
%e The same is true for the subsequence of non-parenthesized terms:
%e 2, 1, 0, 2, 2, 2, 1, 0,...
%Y Cf. A307183 (first binary example of such fractal sequences), A307333 (quaternary), A307335 (quinary), A307336 (senary), A307337 (septuary), A307338 (octal), A307339 (nonary), A307340 (decimal).
%K base,nonn
%O 1,1
%A _Eric Angelini_ and _Carole Dubois_, Apr 02 2019