This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A304337 #13 Feb 05 2022 16:24:18 %S A304337 1,2,4,3,1,5,6,2,4,8,7,3,1,5,9,10,6,2,4,8,12,11,7,3,1,5,9,13,14,10,6, %T A304337 2,4,8,12,16,15,11,7,3,1,5,9,13,17,18,14,10,6,2,4,8,12,16,20,19,15,11, %U A304337 7,3,1,5,9,13,17,21,22,18,14,10,6,2,4,8,12,16,20,24,23,19,15,11,7,3,1 %N A304337 Lexicographically earliest fractal-like sequence such that the erasure of all pairs of contiguous terms of opposite parity leaves the sequence unchanged. %C A304337 The sequence is fractal-like as it embeds an infinite number of copies of itself. %C A304337 The sequence was built according to these rules (see, in the Example section, the parenthesization technique): %C A304337 1) no overlapping pairs of parentheses; %C A304337 2) always start the content inside a pair of parentheses with the smallest integer X not yet present inside another pair of parentheses; %C A304337 3) always end the content inside a pair of parentheses with the smallest integer Y not yet present inside another pair of parentheses such Y is not of the same parity as X; %C A304337 4) after a(1) = 1 and a(2) = 2, always try to extend the sequence with a duplicate of the oldest term of the sequence not yet duplicated; if this leads to a contradiction, open a new pair of parentheses. %H A304337 Carole Dubois, <a href="/A304337/b304337.txt">Table of n, a(n) for n = 1..5000</a> %e A304337 Parentheses are added around each pair of terms of opposite parity: %e A304337 (1,2),(4,3),1,(5,6),2,4,(8,7),3,1,5,(9,10),6,2,4,8,(12,11),7,3,1,5,9,(13,14),10,6,2,4,8,12,(16,15),11,7,3,1,5,9,13,(17,18),14,10,6, %e A304337 Erasing all the parenthesized contents yields %e A304337 (...),(...),1,(...),2,4,(...),3,1,5,(....),6,2,4,8,(.....),7,3,1,5,9,(.....),10,6,2,4,8,12,(.....),11,7,3,1,5,9,13,(.....),14,10,6, %e A304337 We see that the remaining terms slowly rebuild the starting sequence. %Y A304337 Cf. A303845 (same idea, but pairs of contiguous terms are erased if a prime by concatenation arises), A303948 (if pair has at least one digit in common), A303953 (if pair sums up to a square). %K A304337 nonn,base %O A304337 1,2 %A A304337 _Eric Angelini_, May 11 2018