A239830 Triangular array: T(n,k) = number of partitions of 2n that have alternating sum 2k, with T(0,0) = 1 for convenience.
1, 1, 1, 2, 2, 1, 3, 5, 2, 1, 5, 9, 5, 2, 1, 7, 17, 10, 5, 2, 1, 11, 28, 20, 10, 5, 2, 1, 15, 47, 35, 20, 10, 5, 2, 1, 22, 73, 62, 36, 20, 10, 5, 2, 1, 30, 114, 102, 65, 36, 20, 10, 5, 2, 1, 42, 170, 167, 109, 65, 36, 20, 10, 5, 2, 1, 56, 253, 262, 182, 110
Offset: 0
Examples
First nine rows: 1 1 ... 1 2 ... 2 ... 1 3 ... 5 ... 2 ... 1 5 ... 9 ... 5 ... 2 ... 1 7 ... 17 .. 10 .. 5 ... 2 ... 1 11 .. 28 .. 20 .. 10 .. 5 ... 2 ... 1 15 .. 47 .. 35 .. 20 .. 10 .. 5 ... 2 ... 1 22 .. 73 .. 62 .. 36 .. 20 .. 10 .. 5 ... 2 ... 1 The partitions of 6 are 6, 51, 42, 411, 33, 321, 3111, 222, 2211, 21111, 111111, with respective alternating sums 6, 4, 2, 4, 0, 2, 2, 2, 0, 2, 0, so that row 3 (counting the top row as row 0) of the array is 3 .. 5 .. 2 .. 1.
Links
- Alois P. Heinz, Rows n = 0..140, flattened (first 22 rows from Clark Kimberling)
Programs
-
Maple
b:= proc(n, i, t) option remember; `if`(n=0, 1, `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=0..n))(b(2*n$2, 1)): seq(T(n), n=0..14); # Alois P. Heinz, Mar 30 2014
-
Mathematica
z = 16; 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], 2 k]; t[0, 0] = 1; u = Table[t[n, k], {n, 0, z}, {k, 0, n}] TableForm[u] (* A239830, array *) Flatten[u] (* A239830, sequence *) (* Peter J. C. Moses, Mar 21 2014 *)
Comments