A264034 Triangle read by rows: T(n,k) (n>=0, 0<=k<=A161680(n)) is the number of integer partitions of n with weighted sum k.
1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 2, 1, 0, 2, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 2, 1, 1, 2, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 1, 3, 2, 1
Offset: 0
Examples
Triangle T(n,k) begins: 1; 1; 1,1; 1,1,0,1; 1,1,1,1,0,0,1; 1,1,1,1,1,0,1,0,0,0,1; 1,1,1,2,1,0,2,1,0,0,1,0,0,0,0,1; 1,1,1,2,1,1,2,1,0,1,1,1,0,0,0,1,0,0,0,0,0,1; 1,1,1,2,2,1,2,2,1,1,1,1,1,1,0,1,1,0,0,0,0,1,0,0,0,0,0,0,1; ... The a(15,31) = 5 partitions of 15 with weighted sum 31 are: (6,2,2,1,1,1,1,1), (5,4,1,1,1,1,1,1), (5,2,2,2,2,1,1), (4,3,2,2,2,2), (3,3,3,3,2,1). These are also the partitions of 15 with one-based weighted sum 46. - _Gus Wiseman_, Jan 09 2023
Links
- Alois P. Heinz, Rows n = 0..50, flattened
- FindStat - Combinatorial Statistic Finder, Weighted size of a partition
Crossrefs
Programs
-
Maple
b:= proc(n, i, w) option remember; expand( `if`(n=0, 1, `if`(i<1, 0, b(n, i-1, w)+ `if`(i>n, 0, x^(w*i)*b(n-i, i, w+1))))) end: T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n$2, 0)): seq(T(n), n=0..10); # Alois P. Heinz, Nov 01 2015
-
Mathematica
b[n_, i_, w_] := b[n, i, w] = Expand[If[n == 0, 1, If[i < 1, 0, b[n, i - 1, w] + If[i > n, 0, x^(w*i)*b[n - i, i, w + 1]]]]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, n, 0]]; Table[T[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Feb 07 2017, after Alois P. Heinz *) Table[Length[Select[IntegerPartitions[n],Total[Accumulate[Reverse[#]]]==k&]],{n,0,8},{k,n,n*(n+1)/2}] (* Gus Wiseman, Jan 09 2023 *)
Formula
From Alois P. Heinz, Jan 20 2023: (Start)
Comments