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!)
A282694 a(n) = (number of compositions of n into odd parts) - (number of compositions of n into distinct parts). 1
0, 0, 0, -1, 0, 0, -3, 0, 2, 7, -2, 24, 43, 100, 184, 259, 552, 980, 1733, 3004, 5210, 8195, 14414, 23900, 40075, 66264, 110088, 180815, 293496, 483768, 790173, 1290528, 2103434, 3426535, 5572078, 9059040, 14672947, 23841844, 38657104, 62687659, 101582664, 164621876, 266636429, 431873164 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,7
COMMENTS
Inspired by Euler's theorem (see A000009) that number of partitions of n into odd parts = number of partitions of n into distinct parts.
Equals A000045 - A032020 for n>0.
Note that the number of compositions of n into odd parts = Fibonacci(n) = A000045(n) for n>0.
LINKS
FORMULA
G.f.: x / (1 - x - x^2) - Sum_{k>=1} k! * x^(k*(k + 1)/2) / Product_{j=1..k} (1 - x^j). - Ilya Gutkovskiy, Jan 30 2020
MATHEMATICA
T[n_, k_] := T[n, k] = If[k<0 || n<0, 0, If[k==0, If[n==0, 1, 0], T[n - k, k] + k*T[n - k, k - 1]]]; a[n_] := Sum[T[n, k], {k, 0, Floor[(Sqrt[8*n + 1] - 1) / 2]}]; Table[If[n==0, 0, Fibonacci[n] - a[n]], {n, 0, 43}](* Indranil Ghosh, Mar 09 2017, after Jean-François Alcover and Alois P. Heinz *)
PROG
(PARI) T(n, k) = if(k<0 || n<0, 0, if(k==0, if(n==0, 1, 0), T(n - k, k) + k*T(n - k, k - 1)));
a(n) = sum(k=0, floor(sqrt(8*n + 1) - 1), T(n, k));
for (n=0, 43, print1(if(n==0, 0, fibonacci(n) - a(n)), ", ")) \\ Indranil Ghosh, Mar 09 2017
CROSSREFS
Sequence in context: A208764 A209129 A368479 * A374062 A011075 A248820
KEYWORD
sign
AUTHOR
N. J. A. Sloane, Feb 24 2017
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 September 5 21:36 EDT 2024. Contains 375700 sequences. (Running on oeis4.)