A239829 Triangular array: T(n,k) = number of partitions of 2n - 1 that have alternating sum 2k - 1.
1, 2, 1, 4, 2, 1, 7, 5, 2, 1, 12, 10, 5, 2, 1, 19, 19, 10, 5, 2, 1, 30, 33, 20, 10, 5, 2, 1, 45, 57, 36, 20, 10, 5, 2, 1, 67, 92, 64, 36, 20, 10, 5, 2, 1, 97, 147, 107, 65, 36, 20, 10, 5, 2, 1, 139, 227, 177, 110, 65, 36, 20, 10, 5, 2, 1, 195, 345, 282, 184
Offset: 1
Examples
First nine rows: 1 2 ... 1 4 ... 2 ... 1 7 ... 5 ... 2 ... 1 12 .. 10 .. 5 ... 2 ... 1 19 .. 19 .. 10 .. 5 ... 2 ... 1 30 .. 33 .. 20 .. 10 .. 5 ... 2 ... 1 45 .. 57 .. 36 .. 20 .. 10 .. 5 ... 2 ... 1 67 .. 92 .. 64 .. 36 .. 20 .. 10 .. 5 ... 2 ... 1 The partitions of 5 are 5, 41, 32, 311, 221, 2111, 11111, with respective alternating sums 5, 3, 1, 3, 1, 1, 1, so that row 2 of the array is 4 .. 2 .. 1.
Links
- Alois P. Heinz, Rows n = 1..141, flattened (first 20 rows from Clark Kimberling)
Programs
-
Maple
b:= proc(n, i, t) option remember; `if`(n=0, x^(1/2), `if`(i<1, 0, expand(b(n, i-1, t)+`if`(i>n, 0, b(n-i, i, -t)*x^((t*i)/2))))) end: T:= n-> (p-> seq(coeff(p, x, i), i=1..n))(b(2*n-1$2, 1)): seq(T(n), n=1..14); # Alois P. Heinz, Mar 30 2014
-
Mathematica
z = 15; s[w_] := s[w] = Total[Take[#, ;; ;; 2]] - Total[Take[Rest[#], ;; ;; 2]] &[w]; c[n_] := c[n] = Table[s[IntegerPartitions[n][[k]]], {k, 1, PartitionsP[n]}]; t[n_, k_] := Count[c[2 n - 1], 2 k - 1]; u = Table[t[n, k], {n, 1, z}, {k, 1, n}] TableForm[u] (* A239829, array *) Flatten[u] (* A239829, sequence *) (* Peter J. C. Moses, Mar 21 2014 *) b[n_, i_, t_] := b[n, i, t] = If[n == 0, x^(1/2), If[i<1, 0, Expand[b[n, i-1, t] + If[i>n, 0, b[n-i, i, -t]*x^((t*i)/2)]]]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 1, n}]][b[2n-1, 2n-1, 1]]; Table[T[n], {n, 1, 14}] // Flatten (* Jean-François Alcover, Aug 27 2016, after Alois P. Heinz *)
Comments