login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A331606 Number of compositions of n with the multiplicity of the first part odd. 3
1, 1, 4, 4, 12, 18, 44, 72, 158, 288, 604, 1146, 2332, 4528, 9126, 17944, 35940, 71130, 142132, 282344, 563630, 1121936, 2239060, 4462530, 8906236, 17764160, 35458774, 70761520, 141272876, 282025466, 563159588, 1124543256, 2245918406, 4485670168, 8960061076 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

LINKS

Alois P. Heinz, Table of n, a(n) for n = 1..1000

M. Archibald, A. Blecher, A. Knopfmacher, M. E. Mays, Inversions and Parity in Compositions of Integers, J. Int. Seq., Vol. 23 (2020), Article 20.4.1.

FORMULA

G.f.: Sum_{i>=1} (1-x)*x^i/(2*(-2*x^(i+1)+2*x^i-2*x+1)) + x/(2*(1-2*x)).

a(n) = A011782(n) - A331609(n). - Alois P. Heinz, Jan 23 2020

EXAMPLE

For n=3, a(4)=4 as we count 4, 3+1, 1+3 and 2+1+1.

MAPLE

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

      add(b(n-j, p, `if`(p=j, 1-t, t)), j=1..n))

    end:

a:= n-> add(b(n-j, j, 1), j=1..n):

seq(a(n), n=1..38);  # Alois P. Heinz, Jan 23 2020

MATHEMATICA

gf[x_] := x/(2 (1 - 2 x)) + Sum[(1 - x) x^i/(2 (-2 x^(i + 1) + 2 x^i - 2 x + 1))  , {i, 1, 40}]; CL := CoefficientList[Series[gf[x], {x, 0, 35}], x];

Drop[CL, 1] (* Peter Luschny, Jan 23 2020 *)

CROSSREFS

Cf. A011782, A331609 (similar with even).

Sequence in context: A157617 A053415 A303315 * A079902 A309128 A120033

Adjacent sequences:  A331603 A331604 A331605 * A331607 A331608 A331609

KEYWORD

nonn

AUTHOR

Arnold Knopfmacher, Jan 22 2020

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 28 23:26 EDT 2021. Contains 346340 sequences. (Running on oeis4.)