login
Triangular array: T(n,k) = number of partitions of 2n that have alternating sum 2k, with T(0,0) = 1 for convenience.
37

%I #12 Oct 27 2023 20:46:55

%S 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,

%T 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,

%U 42,170,167,109,65,36,20,10,5,2,1,56,253,262,182,110

%N Triangular array: T(n,k) = number of partitions of 2n that have alternating sum 2k, with T(0,0) = 1 for convenience.

%C Suppose that p, with parts x(1) >= x(2) >= ... >= x(k), is a partition of n. Define AS(p), the alternating sum of p, by x(1) - x(2) + x(3) - ... + ((-1)^(k-1))*x(k); note that AS(p) has the same parity as n. Column 1 is given by T(n,1) = A000041(n) for n >= 0, which is the number of partitions of 2n having AS(p) = 0, for n >= 1. Columns 2 and 3 are essentially A000567 and A000710, and the limiting column (after deleting initial 0's), A000712. The sum of numbers in row n is A000041(2n). The corresponding array for partitions into distinct parts is given by A152146 (defined as the number of unrestricted partitions of 2n into 2k even parts).

%H Alois P. Heinz, <a href="/A239830/b239830.txt">Rows n = 0..140, flattened</a> (first 22 rows from Clark Kimberling)

%e First nine rows:

%e 1

%e 1 ... 1

%e 2 ... 2 ... 1

%e 3 ... 5 ... 2 ... 1

%e 5 ... 9 ... 5 ... 2 ... 1

%e 7 ... 17 .. 10 .. 5 ... 2 ... 1

%e 11 .. 28 .. 20 .. 10 .. 5 ... 2 ... 1

%e 15 .. 47 .. 35 .. 20 .. 10 .. 5 ... 2 ... 1

%e 22 .. 73 .. 62 .. 36 .. 20 .. 10 .. 5 ... 2 ... 1

%e 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.

%p b:= proc(n, i, t) option remember; `if`(n=0, 1, `if`(i<1, 0,

%p expand(b(n, i-1, t)+`if`(i>n, 0, b(n-i, i, -t)*x^((t*i)/2)))))

%p end:

%p T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(2*n$2, 1)):

%p seq(T(n), n=0..14); # _Alois P. Heinz_, Mar 30 2014

%t 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}]

%t TableForm[u] (* A239830, array *)

%t Flatten[u] (* A239830, sequence *)

%t (* _Peter J. C. Moses_, Mar 21 2014 *)

%Y Cf. A239829, A239830, A239833.

%K nonn,tabl,easy

%O 0,4

%A _Clark Kimberling_, Mar 28 2014