%N An irregular fractal sequence: underline all terms that follow a comma separating two digits of opposite parities. All underlined terms rebuild the starting sequence. (See the Comments section for more details.)
%C The sequence S starts with a(1) = 1 and a(2) = 3. S is extended by duplicating the first term A among the not yet duplicated terms, under the condition that the first digit of A and the last digit of the sequence have opposite parities. If this is not the case for A, we then extend the sequence with the smallest integer X not yet present in S whose first digit has the same parity as the last digit of the sequence.
%H Jean-Marc Falcoz, <a href="/A306590/b306590.txt">Table of n, a(n) for n = 1..20002</a>
%e After a(1) = 1 and a(2) = 3 we cannot have a(3) = 2 as this 2 would be the first underlined term, which is forbidden (the first underlined term of the sequence must be 1 as we want the underlined terms to rebuild the starting sequence). The same argument forbids a(3) = 4 (the digit 4 and the preceding digit 3, being of opposite parities, would force the term 4 to be the first one to be underlined).
%e This procedure forces the first 6 terms to be 1, 3, 5, 7, 9 and 10. But now something has changed: the last digit of the sequence is even. We must then duplicate the first term not yet duplicated, which is 1, as this digit 1 and the 0 of 10 have opposite parities. We thus have a(7) = 1, our genuine first underlined term. In the same spirit follow a(8) = 11 and a(9) = 12 which, again, ends the sequence with an even digit, allowing us to duplicate 3: a(10) = 3.
%Y Cf. A306580 where the same idea is involved.
%A _Eric Angelini_ and _Jean-Marc Falcoz_, Feb 26 2019