OFFSET
1,2
COMMENTS
The weight of a partition P = x(1)+x(2)+...+x(k) of n is introduced here as k*x(1)+(k-1)*x(2)+...+x(k), which is the number of steps needed to make P from the sum 1+1+...+1 = n by moving dividers (or parentheses) into the sum; see the Example section.
FORMULA
w(n,h) = dot product of (partition # h of n) and (k, k-1, ..., 1), where k = length of (partition # h of n).
EXAMPLE
Represent 1+1+1+1+1 as _1_1_1_1_1_. The partition 2+2+1 matches the placement of dividers d indicated by _1_1d1_1d1d. To place the 1st d takes 2 steps (starting at the 1st _); to place the 2nd d takes 2+2 = 4 steps (starting at the 1st _ ); to place the 3rd d takes 2+2+1 = 5 steps. The total number of steps is 2+4+5 = 11, which is the 5th number in row 5 because 2+2+1 is the 5th partition of 5 in Mathematica ordering. The first 6 rows are:
1
2 ... 3
3 ... 5 ... 6
4 ... 7 ... 6 ... 9 ... 10
5 ... 9 ... 8 ... 12 .. 11 .. 14 ... 15
6 ... 11 .. 10 .. 15 .. 9 ... 14 ... 18 .. 12 .. 17 .. 20 .. 21
MATHEMATICA
p[n_] := p[n] = IntegerPartitions[n]; q[n_] := q[n] = Length[p[n]]; v[n_] := v[n] = Table[n + 1 - i, {i, 1, n}]; w[n_, h_] := w[n, h] = Dot[p[n][[h]], v[Length[p[n][[h]]]]];
Flatten[Table[w[n, h], {n, 1, 9}, {h, 1, q[n]}]] (* A234094 *)
TableForm[Table[w[n, h], {n, 1, 9}, {h, 1, q[n]}]]
CROSSREFS
KEYWORD
nonn,easy,tabf
AUTHOR
Clark Kimberling, Jan 01 2014
STATUS
approved