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 A368398 #17 Dec 28 2023 15:03:48 %S A368398 1,2,7,37,22,95,10,2203,12,1117,622,4991,661,598,542327,793,346, %T A368398 271739,412,136637,72158,1154559,42,166507,44,149869,141742,545667567, %U A368398 50,199795,52,83317,75190,272971255,56,99961,42682,136623867,51004,68474749,35186622,1125971967 %N A368398 Iterates of the Christmas tree pattern map (A367508), where each row is interpreted as a single binary word and converted to decimal. %C A368398 See A367508 for the description of the Christmas tree patterns, references and links. %H A368398 Paolo Xausa, <a href="/A368398/b368398.txt">Table of n, a(n) for n = 1..13494</a> (first 15 orders). %e A368398 The first 4 tree pattern orders of A367508 are shown below (left). In the middle the elements of each row are joined into single words; decimal conversion is on the right. %e A368398 . %e A368398 Order 1: | | %e A368398 0 1 | 01 | 1 %e A368398 | | %e A368398 Order 2: | | %e A368398 10 | 10 | 2 %e A368398 00 01 11 | 000111 | 7 %e A368398 | | %e A368398 Order 3: | | %e A368398 100 101 | 100101 | 37 %e A368398 010 110 | 010110 | 22 %e A368398 000 001 011 111 | 000001011111 | 95 %e A368398 | | %e A368398 Order 4: | | %e A368398 1010 | 1010 | 10 %e A368398 1000 1001 1011 | 100010011011 | 2203 %e A368398 1100 | 1100 | 12 %e A368398 0100 0101 1101 | 010001011101 | 1117 %e A368398 0010 0110 1110 | 001001101110 | 622 %e A368398 0000 0001 0011 0111 1111 | 00000001001101111111 | 4991 %e A368398 . %t A368398 With[{imax=7},Map[FromDigits[StringJoin[#],2]&,NestList[Map[Delete[{If[Length[#]>1,Map[#<>"0"&,Rest[#]],Nothing],Join[{#[[1]]<>"0"},Map[#<>"1"&,#]]},0]&],{{"0","1"}},imax-1],{2}]] (* Generates terms up to order 7 *) %o A368398 (Python) %o A368398 from itertools import islice %o A368398 from functools import reduce %o A368398 def uniq(r): return reduce(lambda u, e: u if e in u else u+[e], r, []) %o A368398 def agen(): # generator of terms %o A368398 R = [["0", "1"]] %o A368398 while R: %o A368398 r = R.pop(0) %o A368398 yield int("".join(r), 2) %o A368398 if len(r) > 1: R.append(uniq([r[k]+"0" for k in range(1, len(r))])) %o A368398 R.append(uniq([r[0]+"0", r[0]+"1"] + [r[k]+"1" for k in range(1, len(r))])) %o A368398 print(list(islice(agen(), 42))) # _Michael S. Branicky_, Dec 26 2023 %Y A368398 Cf. A367508, A367555, A367562. %K A368398 nonn,base %O A368398 1,2 %A A368398 _Paolo Xausa_, Dec 22 2023