A350603 Irregular triangle read by rows: row n lists the elements of the set S_n in increasing order, where S_0 = {0}, and S_n is obtained by applying the operations x -> x+1 and x -> 2*x to S_{n-1}.
0, 0, 1, 0, 1, 2, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 5, 6, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 16, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 20, 24, 32, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 28, 32, 33, 34, 36, 40, 48, 64
Offset: 0
Examples
The first few sets S_n are: [0], [0, 1], [0, 1, 2], [0, 1, 2, 3, 4], [0, 1, 2, 3, 4, 5, 6, 8], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 16], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 20, 24, 32], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 28, 32, 33, 34, 36, 40, 48, 64], ...
Links
- Alois P. Heinz, Rows n = 0..21, flattened
Programs
-
Maple
T:= proc(n) option remember; `if`(n=0, 0, sort([map(x-> [x+1, 2*x][], {T(n-1)})[]])[]) end: seq(T(n), n=0..8); # Alois P. Heinz, Jan 12 2022
-
Mathematica
T[n_] := T[n] = If[n==0, {0}, {#+1, 2#}& /@ T[n-1] // Flatten // Union]; Table[T[n], {n, 0, 8}] // Flatten (* Jean-François Alcover, May 06 2022, after Alois P. Heinz *)
-
Python
from itertools import chain, islice def A350603_gen(): # generator of terms s = {0} while True: yield from sorted(s) s = set(chain.from_iterable((x+1,2*x) for x in s)) A350603_list = list(islice(A350603_gen(),30)) # Chai Wah Wu, Jan 12 2022
Extensions
Definition made more precise by Chai Wah Wu, Jan 12 2022
Comments