cp's OEIS Frontend

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.

A367562 Iterates of the Christmas tree pattern map (A367508), read by rows and converted to decimal.

This page as a plain text file.
%I A367562 #32 Dec 30 2023 14:39:32
%S A367562 0,1,2,0,1,3,4,5,2,6,0,1,3,7,10,8,9,11,12,4,5,13,2,6,14,0,1,3,7,15,20,
%T A367562 21,18,22,16,17,19,23,24,25,10,26,8,9,11,27,12,28,4,5,13,29,2,6,14,30,
%U A367562 0,1,3,7,15,31,42,40,41,43,44,36,37,45,34,38,46,32,33,35,39,47
%N A367562 Iterates of the Christmas tree pattern map (A367508), read by rows and converted to decimal.
%C A367562 See A367508 for the description of the Christmas tree patterns, references and links.
%H A367562 Paolo Xausa, <a href="/A367562/b367562.txt">Table of n, a(n) for n = 1..8190</a> (first 12 orders, flattened).
%e A367562 The first 4 tree pattern orders are shown below (on the right their elements are converted to decimal: the present sequence is obtained by reading the right half of the diagram left to right, top to bottom).
%e A367562 The sequence of the terms in chains of length 1 (marked with asterisks) coincides with the positive terms of A014486.
%e A367562 .
%e A367562 Order 1:                        |
%e A367562               0  1              |      0  1
%e A367562                                 |
%e A367562 Order 2:                        |
%e A367562                10               |        2*
%e A367562            00  01  11           |     0  1  3
%e A367562                                 |
%e A367562 Order 3:                        |
%e A367562             100  101            |      4  5
%e A367562             010  110            |      2  6
%e A367562        000  001  011  111       |   0  1  3  7
%e A367562                                 |
%e A367562 Order 4:                        |
%e A367562               1010              |       10*
%e A367562         1000  1001  1011        |     8  9 11
%e A367562               1100              |       12*
%e A367562         0100  0101  1101        |     4  5 13
%e A367562         0010  0110  1110        |     2  6 14
%e A367562   0000  0001  0011  0111  1111  |  0  1  3  7 15
%e A367562 .
%t A367562 With[{imax=6},Map[FromDigits[#,2]&,NestList[Map[Delete[{If[Length[#]>1,Map[#<>"0"&,Rest[#]],Nothing],Join[{#[[1]]<>"0"},Map[#<>"1"&,#]]},0]&],{{"0","1"}},imax-1],{3}]] (* Generates terms up to order 6 *)
%o A367562 (Python)
%o A367562 from itertools import islice
%o A367562 from functools import reduce
%o A367562 def uniq(r): return reduce(lambda u, e: u if e in u else u+[e], r, [])
%o A367562 def agen():  # generator of terms
%o A367562     R = [["0", "1"]]
%o A367562     while R:
%o A367562         r = R.pop(0)
%o A367562         yield from map(lambda b: int(b, 2), r)
%o A367562         if len(r) > 1: R.append(uniq([r[k]+"0" for k in range(1, len(r))]))
%o A367562         R.append(uniq([r[0]+"0", r[0]+"1"] + [r[k]+"1" for k in range(1, len(r))]))
%o A367562 print(list(islice(agen(), 77))) # _Michael S. Branicky_, Nov 23 2023
%Y A367562 Cf. A014486, A367508, A367555, A367726, A367951, A367953, A368400, A368431.
%K A367562 nonn,base,tabf,look
%O A367562 1,3
%A A367562 _Paolo Xausa_, Nov 23 2023