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 A350604 #27 Feb 25 2025 19:15:30 %S A350604 1,1,2,3,1,2,3,4,6,9,1,2,3,4,6,8,9,12,18,27,1,2,3,4,6,8,9,12,16,18,24, %T A350604 27,36,54,81,1,2,3,4,6,8,9,12,16,18,24,27,32,36,48,54,72,81,108,162, %U A350604 243,1,2,3,4,6,8,9,12,16,18,24,27,32,36,48,54,64,72,81,96,108,144,162,216,243,324,486,729 %N A350604 Irregular triangle read by rows: row n lists the elements of the set S_n in increasing order, where S_1 = {1}, and S_{n+1} is the union of S_n, 2*S_n, and 3*S_n. %C A350604 S_n contains n*(n+1)/2 elements. %C A350604 The rows converge to A003586. %H A350604 Alois P. Heinz, <a href="/A350604/b350604.txt">Rows n = 1..50, flattened</a> %e A350604 The first few sets S_n are: %e A350604 [1], %e A350604 [1, 2, 3], %e A350604 [1, 2, 3, 4, 6, 9], %e A350604 [1, 2, 3, 4, 6, 8, 9, 12, 18, 27], %e A350604 [1, 2, 3, 4, 6, 8, 9, 12, 16, 18, 24, 27, 36, 54, 81], %e A350604 [1, 2, 3, 4, 6, 8, 9, 12, 16, 18, 24, 27, 32, 36, 48, 54, 72, 81, 108, 162, 243], %e A350604 ... %p A350604 T:= proc(n) option remember; `if`(n=1, 1, sort( %p A350604 [map(k-> [k, 2*k, 3*k][], {T(n-1)})[]])[]) %p A350604 end: %p A350604 seq(T(n), n=1..7); # _Alois P. Heinz_, Jan 12 2022 %t A350604 S[1] = {1}; %t A350604 S[n_] := S[n] = Union[S[n-1], 2*S[n-1], 3*S[n-1]]; %t A350604 Table[S[n], {n, 1, 7}] // Flatten (* _Jean-François Alcover_, Jun 02 2022 *) %o A350604 (Python) %o A350604 from itertools import chain, islice %o A350604 def A350604_gen(): # generator of terms %o A350604 s = {1} %o A350604 while True: %o A350604 yield from sorted(s) %o A350604 s = set(chain.from_iterable((x,2*x,3*x) for x in s)) %o A350604 A350604_list = list(islice(A350604_gen(),30)) # _Chai Wah Wu_, Jan 12 2022 %Y A350604 Cf. A003586, A350603. %K A350604 nonn,look,tabf %O A350604 1,3 %A A350604 _N. J. A. Sloane_, Jan 12 2022