login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A242499 Number of compositions of n, where the difference between the number of odd parts and the number of even parts is 1. 2
1, 0, 1, 3, 1, 9, 11, 18, 51, 65, 151, 290, 477, 1043, 1835, 3486, 6931, 12540, 24607, 46797, 87979, 171072, 323269, 619245, 1190619, 2264925, 4357211, 8343322, 15973309, 30711853, 58846191, 113027716, 217192103, 416964202, 801880039, 1541412015, 2963997227 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
With offset 2 number of compositions of n, where the difference between the number of odd parts and the number of even parts is -1.
LINKS
FORMULA
Recurrence (for n>=5): (n+2)*(16*n^4 - 128*n^3 + 344*n^2 - 352*n + 89)*a(n) = -32*(n+1)*(2*n-5)*a(n-1) + 2*(16*n^5 - 112*n^4 + 264*n^3 - 320*n^2 + 301*n - 89)*a(n-2) + 2*(2*n-5)*(16*n^4 - 80*n^3 + 80*n^2 + 36*n - 53)*a(n-3) - (n-4)*(16*n^4 - 64*n^3 + 56*n^2 + 16*n - 31)*a(n-4). - Vaclav Kotesovec, May 20 2014
MAPLE
a:= proc(n) option remember;
`if`(n<6, [0, 1, 0, 1, 3, 1][n+1],
((3*n-2)*a(n-2) +(4*n+2)*a(n-3) -(3*n-10)*a(n-4)
-(4*n-22)*a(n-5) +(n-6)*a(n-6))/(n+2))
end:
seq(a(n), n=1..50);
MATHEMATICA
a[n_] := a[n] = If[n<6, {0, 1, 0, 1, 3, 1}[[n+1]], ((3n-2)a[n-2] + (4n+2)a[n-3] - (3n-10)a[n-4] - (4n-22)a[n-5] + (n-6)a[n-6])/(n+2)];
Array[a, 50] (* Jean-François Alcover, Dec 28 2020, after Alois P. Heinz *)
CROSSREFS
Column k=1 of A242498.
Sequence in context: A184061 A222057 A260285 * A354622 A173020 A334062
KEYWORD
nonn
AUTHOR
Alois P. Heinz, May 16 2014
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 19:21 EDT 2024. Contains 371754 sequences. (Running on oeis4.)