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”).
%I #18 Oct 20 2014 09:49:37
%S 1,3,7,1,15,3,31,7,1,63,17,3,127,43,8,1,255,108,22,3,511,273,63,9,1,
%T 1023,708,157,23,3,2047,1867,502,67,10,1,4095,4955,1562,203,26,3,8191,
%U 13256,4688,693,83,11,1,16383,35790,15533,2584,322,30,3,32767,97340
%N Irregular triangle T(n,k), n>=1, 1<=k<=ceiling(n/2), read by rows: T(n,k) is the number of different ways to select k disjoint (nonempty) subsets from {1..n} with equal element sum.
%H Alois P. Heinz, <a href="/A196231/b196231.txt">Rows n = 1..26, flattened</a>
%e T(8,4) = 3: {1,6}, {2,5}, {3,4}, {7} have element sum 7, {1,7}, {2,6}, {3,5}, {8} have element sum 8, and {1,8}, {2,7}, {3,6}, {4,5} have element sum 9.
%e Triangle begins:
%e . 1;
%e . 3;
%e . 7, 1;
%e . 15, 3;
%e . 31, 7, 1;
%e . 63, 17, 3;
%e . 127, 43, 8, 1;
%e . 255, 108, 22, 3;
%p b:= proc(l, n, k) option remember; local i, j; `if`(l=[0$k], 1, `if`(add(j, j=l)>n*(n-1)/2, 0, b(l, n-1, k))+ add(`if`(l[j] -n<0, 0, b(sort([seq(l[i] -`if`(i=j, n, 0), i=1..k)]), n-1, k)), j=1..k)) end: T:= (n, k)-> add(b([t$k], n, k), t=2*k-1..floor(n*(n+1)/(2*k)))/k!:
%p seq(seq(T(n, k), k=1..ceil(n/2)), n=1..15);
%t b[l_List, n_, k_] := b[l, n, k] = Module[{i, j}, If[l == Array[0&, k], 1, If [Total[l] > n*(n-1)/2, 0, b[l, n-1, k]] + Sum [If [l[[j]] - n < 0, 0, b[Sort[Table[l[[i]] - If[i == j, n, 0], {i, 1, k}]], n-1, k]], {j, 1, k}]] ]; T[n_, k_] := Sum[b[Array[t&, k], n, k], {t, 2*k-1, Floor[n*(n+1)/(2*k)]}]/k!; Table[Table[T[n, k], {k, 1, Ceiling[n/2]}], {n, 1, 15}] // Flatten (* _Jean-François Alcover_, Dec 17 2013, translated from Maple *)
%Y Columns k=1-10 give: A000225, A161943, A164934, A164949, A196232, A196233, A196234, A196235, A196236, A196237. Row sums give A196534. Row lengths are in A110654.
%K nonn,tabf
%O 1,2
%A _Alois P. Heinz_, Sep 29 2011