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 A213238 #15 Feb 19 2021 11:17:06 %S A213238 1,3,8,12,18,24,32,40,42,50,60,64,72,84,88,90,98,99,105,112,120,128, %T A213238 130,135,144,162,168,180,182,192,200,208,210,220,231,242,252,264,266, %U A213238 272,280,288,294,300,312,315,320,324,330,338,340,360,364,378,392,400 %N A213238 Triangle T(n,k) in which n-th row lists in increasing order the distinct values v satisfying v = sum of elements in S = product of elements in P for a partition of {1,...,n} into two sets S and P. %H A213238 Alois P. Heinz, <a href="/A213238/b213238.txt">Rows n = 1..798, flattened</a> %F A213238 T(n,1) = floor((n-1)^2/2) = A007590(n-1) for n>=5. %e A213238 For n=1 v=1 satisfies the condition with S={1}, P={} => row 1 = [1]. %e A213238 For n=2 no v can be found => row 2 is empty: []. %e A213238 For n=3 there is one solution: S={1,2}, P={3}, v=3 => row 3 = [3]. %e A213238 For n=10 we have three partitions of {1,2,...,10} into S and P satisfying v = Sum_{i:S} i = Product_{k:P} k but there are only two distinct values v: S={2,3,5,6,7,8,9}, P={1,4,10}, v=40; S={4,5,6,8,9,10}, P={1,2,3,7}, v=42; S={1,2,3,4,5,8,9,10}, P={6,7}, v=42 => row 10 = [40, 42]. %e A213238 Triangle T begins: %e A213238 1; %e A213238 ; %e A213238 3; %e A213238 ; %e A213238 8; %e A213238 12; %e A213238 18; %e A213238 24; %e A213238 32; %e A213238 40, 42; %e A213238 50; %e A213238 60, 64; %e A213238 72; %e A213238 84, 88, 90; %e A213238 ... %p A213238 b:= proc(n, s, p) %p A213238 `if`(s=p, {s}, `if`(n<1, {}, {b(n-1, s, p)[], %p A213238 `if`(s-n<p*n, {}, b(n-1, s-n, p*n))[]})) %p A213238 end: %p A213238 T:= n-> sort([b(n, n*(n+1)/2, 1)[]])[]: %p A213238 seq(T(n), n=1..30); %t A213238 b[n_, s_, p_] := %t A213238 If[s == p, {s}, If[n < 1, {}, {b[n-1, s, p], %t A213238 If[s-n < p*n, {}, b[n-1, s-n, p*n]]} // Union]]; %t A213238 T[n_] := Sort[b[n, n(n+1)/2, 1] // Flatten] // Union; %t A213238 Array[T, 30] // Flatten (* _Jean-François Alcover_, Feb 19 2021, after _Alois P. Heinz_ *) %Y A213238 Row lengths (or number of solutions) are in A213237. %Y A213238 T(n,1) = A007590(n-1) for n>=5. %K A213238 nonn,tabf %O A213238 1,2 %A A213238 _Alois P. Heinz_, Jun 07 2012