[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A098123 revision #15

A098123
Number of compositions of n with equal number of even and odd parts.
16
1, 0, 0, 2, 0, 4, 6, 6, 24, 28, 60, 130, 190, 432, 770, 1386, 2856, 5056, 9828, 18918, 34908, 68132, 128502, 244090, 470646, 890628, 1709136, 3271866, 6238986, 11986288, 22925630, 43932906, 84349336, 161625288, 310404768, 596009494
OFFSET
0,4
LINKS
FORMULA
a(n) = Sum_{k=floor(n/3)..floor(n/2)} C(2*n-4*k,n-2*k)*C(n-1-k,2*n-4*k-1).
Recurrence: n*(2*n-7)*a(n) = 2*(n-2)*(2*n-5)*a(n-2) + 2*(2*n-7)*(2*n-3)*a(n-3) - (n-4)*(2*n-3)*a(n-4). - Vaclav Kotesovec, May 01 2014
a(n) ~ sqrt(c) * d^n / sqrt(Pi*n), where d = 1.94696532812840456026081823863... is the root of the equation 1-4*d-2*d^2+d^4 = 0, c = 0.225563290820392765554898545739... is the root of the equation 43*c^4-18*c^2+8*c-1=0. - Vaclav Kotesovec, May 01 2014
EXAMPLE
From Gus Wiseman, Jun 26 2022: (Start)
The a(0) = 1 through a(7) = 6 compositions (empty columns indicated by dots):
() . . (12) . (14) (1122) (16)
(21) (23) (1212) (25)
(32) (1221) (34)
(41) (2112) (43)
(2121) (52)
(2211) (61)
(End)
MATHEMATICA
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], Count[#, _?EvenQ]==Count[#, _?OddQ]&]], {n, 0, 15}] (* Gus Wiseman, Jun 26 2022 *)
CROSSREFS
For partitions: A045931, ranked by A325698, strict A239241 (conj A352129).
Column k=0 of A242498.
Without multiplicity: A242821, for partitions A241638 (ranked by A325700).
These compositions are ranked by A355321.
A047993 counts balanced partitions, ranked by A106529.
A108950/A108949 count partitions with more odd/even parts.
A130780/A171966 count partitions with more or as many odd/even parts.
Sequence in context: A192134 A322402 A196877 * A066659 A343468 A287846
KEYWORD
easy,nonn
AUTHOR
Vladeta Jovovic, Sep 24 2004
STATUS
editing