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.

A234094 Array {w(n,h)}: row n shows the weights, as defined in Comments, of the partitions of n, arranged in Mathematica order.

Original entry on oeis.org

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, 7, 13, 12, 18, 11, 17, 22, 16, 15, 21, 25, 19, 24, 27, 28, 8, 15, 14, 21, 13, 20, 26, 12, 19, 18, 25, 30, 17, 24, 23, 29, 33, 20, 27, 32, 35, 36, 9, 17, 16
Offset: 1

Views

Author

Clark Kimberling, Jan 01 2014

Keywords

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.

Examples

			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
		

Crossrefs

Programs

  • 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]}]]

Formula

w(n,h) = dot product of (partition # h of n) and (k, k-1, ..., 1), where k = length of (partition # h of n).