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 #32 Dec 12 2020 04:31:02
%S 1,3,3,6,5,6,10,16,8,10,15,23,22,12,15,21,47,44,30,17,21,28,62,74,56,
%T 40,23,28,36,104,115,114,71,52,30,36,45,130,196,162,139,89,66,38,45,
%U 55,195,268,286,227,169,110,82,47,55,66,235,395,407,369,269,204,134,100,57,66
%N T(n,k) is the sum of the hook lengths over the partitions of n with exactly k parts.
%C Row sums equal A066183 ('Total sum of squares of parts in all partitions of n').
%C From _Omar E. Pol_, Mar 20 2018: (Start)
%C Both column 1 and leading diagonal give A000217, n >= 1.
%C Both A206561 and A299768 have the same row sums as this triangle.
%C Apparently the second diagonal gives A133263 without the first term. (End)
%H Alois P. Heinz, <a href="/A180681/b180681.txt">Rows n = 1..200, flattened</a>
%e T(5,3) = 22 since the partitions of 5 in 3 parts are 221 and 311, with hook lengths {{2,4}, {1,3}, {1}} and {{1,2,5}, {2}, {1}} summing to 22.
%e Triangle T(n,k) begins:
%e 1;
%e 3, 3;
%e 6, 5, 6;
%e 10, 16, 8, 10;
%e 15, 23, 22, 12, 15;
%e 21, 47, 44, 30, 17, 21;
%e 28, 62, 74, 56, 40, 23, 28;
%e 36, 104, 115, 114, 71, 52, 30, 36;
%e 45, 130, 196, 162, 139, 89, 66, 38, 45;
%e 55, 195, 268, 286, 227, 169, 110, 82, 47, 55;
%p f:= n-> (n-1)*n/2:
%p b:= proc(n, i) option remember; `if`(n=0 or i=1, [1, n+f(n)],
%p b(n, i-1)+(p-> p+[0, p[1]*(n+f(i))])(b(n-i, min(n-i, i))))
%p end:
%p T:= (n, k)-> (p-> p[1]*(n+f(k))+p[2])(b(n-k, min(n-k, k))):
%p seq(seq(T(n, k), k=1..n), n=1..14); # _Alois P. Heinz_, Mar 20 2018
%t (*Needs["DiscreteMath`Combinatorica`"]; hooklength[(p_)?PartitionQ] := Block[{ferr = (PadLeft[1 + 0*Range[ #1], Max[p]] & ) /@ p}, DeleteCases[(Rest[FoldList[Plus, 0, #1]] & ) /@ ferr + Reverse /@ Reverse[Transpose[(Rest[FoldList[Plus, 0, #1]] & ) /@ Reverse[Reverse /@ Transpose[ferr]]]], 0, {2}] - 1]; partitionexact[n_, m_] := TransposePartition /@ (Prepend[ #1, m] & ) /@ Partitions[n - m, m] *); Table[Tr[ Tr[ Flatten[hooklength[ # ]]] &/@ partitionexact[n,k] ] ,{n,16},{k,n}]
%t (* Second program: *)
%t Table[p = IntegerPartitions[n, {k}]; Total@Table[y = Table[Boole[p[[l]][[i]] >= j], {i, k}, {j, n}]; Total[Table[Total[{y[[i, j ;; n]], y[[i + 1 ;; k, j]]}, 2], {i, k}, {j, n}], 2], {l, Length[p]}], {n, 11}, {k, n}] // Flatten (* _Robert Price_, Jun 19 2020 *)
%t f[n_] := n(n-1)/2;
%t b[n_, i_] := b[n, i] = If[n == 0 || i == 1, {1, n + f[n]}, b[n, i - 1] + Function[p, p + {0, p[[1]] (n + f[i])}][b[n - i, Min[n - i, i]]]];
%t T[n_, k_] := Function[p, p[[1]] (n + f[k]) + p[[2]]][b[n-k, Min[n-k, k]]];
%t Table[Table[T[n, k], {k, 1, n}], {n, 1, 14}] // Flatten (* _Jean-François Alcover_, Dec 12 2020, after _Alois P. Heinz_ *)
%Y Cf. A000217, A008284, A066183, A133263, A206561, A299768.
%Y T(2n-1,n) gives A301499.
%K nonn,tabl
%O 1,2
%A _Wouter Meeussen_, Sep 16 2010