login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Row sums of A367562 (iterates of the Christmas tree pattern map, A367508, converted to decimal).
2

%I #18 Nov 30 2023 07:14:14

%S 1,2,4,9,8,11,10,28,12,22,22,26,41,40,75,49,36,55,40,51,52,57,42,124,

%T 44,118,118,186,50,148,52,94,94,130,56,106,94,114,100,112,114,120,169,

%U 168,331,177,164,311,168,307,308,441,201,200,395,209,148,231,152,227

%N Row sums of A367562 (iterates of the Christmas tree pattern map, A367508, converted to decimal).

%C See A367508 for the description of the Christmas tree patterns, references and links.

%H Paolo Xausa, <a href="/A367726/b367726.txt">Table of n, a(n) for n = 1..13494</a> (first 15 orders).

%H Michael De Vlieger, <a href="/A367726/a367726.png">Log log scatterplot of a(n)</a>, n = 1..99294 (18 orders) showing primes in red, and nonprimes in dark green.

%H Michael De Vlieger, <a href="/A367726/a367726_1.png">Log log scatterplot of a(n)</a>, n = 1..7059 (14 orders) showing primes in red, composite prime powers in gold, squarefree composites in green, and numbers neither squarefree nor prime powers in blue, accentuating numbers of the last category that are also squareful in light blue.

%e The first 4 tree pattern orders of A367508 are shown below (left). In the middle they are converted to decimal (A367562); row sums are on the right.

%e .

%e Order 1: | |

%e 0 1 | 0 1 | 1

%e | |

%e Order 2: | |

%e 10 | 2 | 2

%e 00 01 11 | 0 1 3 | 4

%e | |

%e Order 3: | |

%e 100 101 | 4 5 | 9

%e 010 110 | 2 6 | 8

%e 000 001 011 111 | 0 1 3 7 | 11

%e | |

%e Order 4: | |

%e 1010 | 10 | 10

%e 1000 1001 1011 | 8 9 11 | 28

%e 1100 | 12 | 12

%e 0100 0101 1101 | 4 5 13 | 22

%e 0010 0110 1110 | 2 6 14 | 22

%e 0000 0001 0011 0111 1111 | 0 1 3 7 15 | 26

%e .

%t With[{imax=8},Map[Total,Map[FromDigits[#,2]&,NestList[Map[Delete[{If[Length[#]>1,Map[#<>"0"&,Rest[#]],Nothing],Join[{#[[1]]<>"0"},Map[#<>"1"&,#]]},0]&],{{"0","1"}},imax-1],{3}],{2}]] (* Generates terms up to order 8 *)

%o (Python)

%o from itertools import islice

%o from functools import reduce

%o def uniq(r): return reduce(lambda u, e: u if e in u else u+[e], r, [])

%o def agen(): # generator of terms

%o R = [["0", "1"]]

%o while R:

%o r = R.pop(0)

%o yield sum(map(lambda b: int(b, 2), r))

%o if len(r) > 1: R.append(uniq([r[k]+"0" for k in range(1, len(r))]))

%o R.append(uniq([r[0]+"0", r[0]+"1"] + [r[k]+"1" for k in range(1, len(r))]))

%o print(list(islice(agen(), 60))) # _Michael S. Branicky_, Nov 28 2023

%Y Cf. A367508, A367562.

%K nonn,base,look

%O 1,2

%A _Paolo Xausa_, Nov 28 2023