A367726 Row sums of A367562 (iterates of the Christmas tree pattern map, A367508, converted to decimal).
1, 2, 4, 9, 8, 11, 10, 28, 12, 22, 22, 26, 41, 40, 75, 49, 36, 55, 40, 51, 52, 57, 42, 124, 44, 118, 118, 186, 50, 148, 52, 94, 94, 130, 56, 106, 94, 114, 100, 112, 114, 120, 169, 168, 331, 177, 164, 311, 168, 307, 308, 441, 201, 200, 395, 209, 148, 231, 152, 227
Offset: 1
Examples
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. . Order 1: | | 0 1 | 0 1 | 1 | | Order 2: | | 10 | 2 | 2 00 01 11 | 0 1 3 | 4 | | Order 3: | | 100 101 | 4 5 | 9 010 110 | 2 6 | 8 000 001 011 111 | 0 1 3 7 | 11 | | Order 4: | | 1010 | 10 | 10 1000 1001 1011 | 8 9 11 | 28 1100 | 12 | 12 0100 0101 1101 | 4 5 13 | 22 0010 0110 1110 | 2 6 14 | 22 0000 0001 0011 0111 1111 | 0 1 3 7 15 | 26 .
Links
- Paolo Xausa, Table of n, a(n) for n = 1..13494 (first 15 orders).
- Michael De Vlieger, Log log scatterplot of a(n), n = 1..99294 (18 orders) showing primes in red, and nonprimes in dark green.
- Michael De Vlieger, Log log scatterplot of a(n), 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.
Programs
-
Mathematica
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 *)
-
Python
from itertools import islice from functools import reduce def uniq(r): return reduce(lambda u, e: u if e in u else u+[e], r, []) def agen(): # generator of terms R = [["0", "1"]] while R: r = R.pop(0) yield sum(map(lambda b: int(b, 2), r)) if len(r) > 1: R.append(uniq([r[k]+"0" for k in range(1, len(r))])) R.append(uniq([r[0]+"0", r[0]+"1"] + [r[k]+"1" for k in range(1, len(r))])) print(list(islice(agen(), 60))) # Michael S. Branicky, Nov 28 2023
Comments