login
A114921
Number of unimodal compositions of n+2 where the maximal part appears exactly twice.
14
1, 0, 1, 2, 4, 6, 11, 16, 27, 40, 63, 92, 141, 202, 299, 426, 614, 862, 1222, 1694, 2362, 3242, 4456, 6054, 8229, 11072, 14891, 19872, 26477, 35050, 46320, 60866, 79827, 104194, 135703, 176008, 227791, 293702, 377874, 484554, 620011, 790952, 1006924
OFFSET
0,4
COMMENTS
Old name was: Expansion of a q-series.
a(n) is also the number of 2-colored partitions of n with the same number of parts in each color. - Shishuo Fu, May 30 2017
From Gus Wiseman, Mar 25 2021: (Start)
Also the number of even-length compositions of n with alternating parts weakly decreasing. Allowing odd lengths also gives A342528. The version with alternating parts strictly decreasing appears to be A064428. The a(2) = 1 through a(7) = 16 compositions are:
(1,1) (1,2) (1,3) (1,4) (1,5) (1,6)
(2,1) (2,2) (2,3) (2,4) (2,5)
(3,1) (3,2) (3,3) (3,4)
(1,1,1,1) (4,1) (4,2) (4,3)
(1,2,1,1) (5,1) (5,2)
(2,1,1,1) (1,2,1,2) (6,1)
(1,3,1,1) (1,3,1,2)
(2,1,2,1) (1,4,1,1)
(2,2,1,1) (2,2,1,2)
(3,1,1,1) (2,2,2,1)
(1,1,1,1,1,1) (2,3,1,1)
(3,1,2,1)
(3,2,1,1)
(4,1,1,1)
(1,2,1,1,1,1)
(2,1,1,1,1,1)
(End)
LINKS
S. Fu and D. Tang, On a generalized crank for k-colored partitions, arXiv:1705.10067 [math.CO], 2017.
B. Kim and J. Lovejoy, Ramanujan-type partial theta identities and rank differences for special unimodal sequences, Annals of Combinatorics, 19 (2015), 705-733.
FORMULA
G.f.: 1 + Sum_{k>0} (x^k / ((1-x)(1-x^2)...(1-x^k)))^2 = (1 + Sum_{k>0} 2 (-1)^k x^((k^2+k)/2) ) / (Product_{k>0} (1 - x^k))^2.
G.f.: 1 + x*(1 - G(0))/(1-x) where G(k) = 1 - x/(1-x^(k+1))^2/(1-x/(x-1/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jan 23 2013
a(n) = A006330(n) - A001523(n). - Vaclav Kotesovec, Jun 22 2015
a(n) ~ Pi * exp(2*Pi*sqrt(n/3)) / (16 * 3^(5/4) * n^(7/4)). - Vaclav Kotesovec, Oct 24 2018
EXAMPLE
From Joerg Arndt, Jun 10 2013: (Start)
There are a(7)=16 such compositions of 7+2=9 where the maximal part appears twice:
01: [ 1 1 1 1 1 2 2 ]
02: [ 1 1 1 1 2 2 1 ]
03: [ 1 1 1 2 2 1 1 ]
04: [ 1 1 1 3 3 ]
05: [ 1 1 2 2 1 1 1 ]
06: [ 1 1 3 3 1 ]
07: [ 1 2 2 1 1 1 1 ]
08: [ 1 2 3 3 ]
09: [ 1 3 3 1 1 ]
10: [ 1 3 3 2 ]
11: [ 1 4 4 ]
12: [ 2 2 1 1 1 1 1 ]
13: [ 2 3 3 1 ]
14: [ 3 3 1 1 1 ]
15: [ 3 3 2 1 ]
16: [ 4 4 1 ]
(End)
MATHEMATICA
max = 50; s = (1+Sum[2*(-1)^k*q^(k(k+1)/2), {k, 1, max}])/QPochhammer[q]^2+ O[q]^max; CoefficientList[s, q] (* Jean-François Alcover, Nov 30 2015, from 1st g.f. *)
wdw[q_]:=And@@Table[q[[i]]>=q[[i+2]], {i, Length[q]-2}];
Table[Length[Select[Join@@Permutations/@Select[IntegerPartitions[n], EvenQ[Length[#]]&], wdw]], {n, 0, 15}] (* Gus Wiseman, Mar 25 2021 *)
PROG
(PARI) {a(n) = if( n<0, 0, polcoeff( sum(k=0, n\2, x^(2*k) / prod(i=1, k, 1 - x^i, 1 + x * O(x^n))^2), n))};
(PARI) {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( sum(k=1, sqrtint(8*n + 1)\2, 2*(-1)^k * x^((k^2+k)/2), 1 + A) / eta(x + A)^2, n))};
CROSSREFS
Cf. A226541 (max part appears three times), A188674 (max part m appears m times), A001523 (max part appears any number of times).
Column k=2 of A247255.
A000041 counts weakly increasing (or weakly decreasing) compositions.
A000203 adds up divisors.
A002843 counts compositions with all adjacent parts x <= 2y.
A003242 counts anti-run compositions.
A034008 counts even-length compositions.
A065608 counts even-length compositions with alternating parts equal.
A342528 counts compositions with alternating parts weakly decreasing.
A342532 counts even-length compositions with alternating parts unequal.
Sequence in context: A062766 A115269 A103692 * A103442 A238375 A056342
KEYWORD
nonn
AUTHOR
Michael Somos, Jan 07 2006
EXTENSIONS
New name from Joerg Arndt, Jun 10 2013
STATUS
approved