cp's OEIS Frontend

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.

A180681 T(n,k) is the sum of the hook lengths over the partitions of n with exactly k parts.

This page as a plain text file.
%I A180681 #32 Dec 12 2020 04:31:02
%S A180681 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 A180681 40,23,28,36,104,115,114,71,52,30,36,45,130,196,162,139,89,66,38,45,
%U A180681 55,195,268,286,227,169,110,82,47,55,66,235,395,407,369,269,204,134,100,57,66
%N A180681 T(n,k) is the sum of the hook lengths over the partitions of n with exactly k parts.
%C A180681 Row sums equal A066183 ('Total sum of squares of parts in all partitions of n').
%C A180681 From _Omar E. Pol_, Mar 20 2018: (Start)
%C A180681 Both column 1 and leading diagonal give A000217, n >= 1.
%C A180681 Both A206561 and A299768 have the same row sums as this triangle.
%C A180681 Apparently the second diagonal gives A133263 without the first term. (End)
%H A180681 Alois P. Heinz, <a href="/A180681/b180681.txt">Rows n = 1..200, flattened</a>
%e A180681 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 A180681 Triangle T(n,k) begins:
%e A180681    1;
%e A180681    3,   3;
%e A180681    6,   5,   6;
%e A180681   10,  16,   8,  10;
%e A180681   15,  23,  22,  12,  15;
%e A180681   21,  47,  44,  30,  17,  21;
%e A180681   28,  62,  74,  56,  40,  23,  28;
%e A180681   36, 104, 115, 114,  71,  52,  30, 36;
%e A180681   45, 130, 196, 162, 139,  89,  66, 38, 45;
%e A180681   55, 195, 268, 286, 227, 169, 110, 82, 47, 55;
%p A180681 f:= n-> (n-1)*n/2:
%p A180681 b:= proc(n, i) option remember; `if`(n=0 or i=1, [1, n+f(n)],
%p A180681       b(n, i-1)+(p-> p+[0, p[1]*(n+f(i))])(b(n-i, min(n-i, i))))
%p A180681     end:
%p A180681 T:= (n, k)-> (p-> p[1]*(n+f(k))+p[2])(b(n-k, min(n-k, k))):
%p A180681 seq(seq(T(n, k), k=1..n), n=1..14);  # _Alois P. Heinz_, Mar 20 2018
%t A180681 (*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 A180681 (* Second program: *)
%t A180681 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 A180681 f[n_] := n(n-1)/2;
%t A180681 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 A180681 T[n_, k_] := Function[p, p[[1]] (n + f[k]) + p[[2]]][b[n-k, Min[n-k, k]]];
%t A180681 Table[Table[T[n, k], {k, 1, n}], {n, 1, 14}] // Flatten (* _Jean-François Alcover_, Dec 12 2020, after _Alois P. Heinz_ *)
%Y A180681 Cf. A000217, A008284, A066183, A133263, A206561, A299768.
%Y A180681 T(2n-1,n) gives A301499.
%K A180681 nonn,tabl
%O A180681 1,2
%A A180681 _Wouter Meeussen_, Sep 16 2010