A114921 Number of unimodal compositions of n+2 where the maximal part appears exactly twice.
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
Keywords
Examples
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)
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..10000
- 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.
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.
Programs
-
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 *)
-
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))};
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) ~ Pi * exp(2*Pi*sqrt(n/3)) / (16 * 3^(5/4) * n^(7/4)). - Vaclav Kotesovec, Oct 24 2018
Extensions
New name from Joerg Arndt, Jun 10 2013
Comments