A369584 a(n) = 2^(n - 3) - A368279(n) for n >= 5, otherwise 0. Number of compositions of n whose first and last part is not equal to 1 and whose first part is not the largest part.
0, 0, 0, 0, 0, 1, 2, 6, 13, 30, 65, 140, 296, 622, 1294, 2679, 5518, 11323, 23160, 47250, 96184, 195438, 396490, 803292, 1625591, 3286340, 6637913, 13397224, 27020974, 54465702, 109725932, 220944768, 444700208, 894701728, 1799419458, 3617792587, 7271505058
Offset: 0
Keywords
Examples
The compositions of class Z(n) for n = 5..7 are: 5: [2, 3]; 6: [2, 1, 3], [2, 4]; 7: [2, 1, 1, 3], [2, 1, 4], [2, 2, 3], [2, 3, 2], [2, 5], [3, 4]. The cardinalities of some tripartitions, |X(n)| + |Y(n)| + |Z(n)| = 2^(n - 1): 5: 12 + 3 + 1 = 16; 6: 24 + 6 + 2 = 32; 7: 48 + 10 + 6 = 64; 8: 96 + 19 + 13 = 128; 9: 192 + 34 + 30 = 256; 10: 384 + 63 + 65 = 512.
Programs
Formula
a(n) = [x^n] (1 + (x - 1)*(1 + x^2/(2*x - 1) + Sum_{k>=1} x^k/(1 - x*(1 - x^k)/(1 - x)))).
card(X(n)) + card(Y(n)) + card(Z(n)) = A011782(n) = 2^(n - 1) for n > 0.
Comments