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

%I #17 Jan 30 2020 18:14:46

%S 0,0,0,-1,0,0,-3,0,2,7,-2,24,43,100,184,259,552,980,1733,3004,5210,

%T 8195,14414,23900,40075,66264,110088,180815,293496,483768,790173,

%U 1290528,2103434,3426535,5572078,9059040,14672947,23841844,38657104,62687659,101582664,164621876,266636429,431873164

%N a(n) = (number of compositions of n into odd parts) - (number of compositions of n into distinct parts).

%C Inspired by Euler's theorem (see A000009) that number of partitions of n into odd parts = number of partitions of n into distinct parts.

%C Equals A000045 - A032020 for n>0.

%C Note that the number of compositions of n into odd parts = Fibonacci(n) = A000045(n) for n>0.

%H Indranil Ghosh, <a href="/A282694/b282694.txt">Table of n, a(n) for n = 0..1000</a>

%F 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

%t 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_ *)

%o (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)));

%o a(n) = sum(k=0, floor(sqrt(8*n + 1) - 1), T(n, k));

%o for (n=0, 43, print1(if(n==0, 0, fibonacci(n) - a(n)),", ")) \\ _Indranil Ghosh_, Mar 09 2017

%Y Cf. A000009, A000045, A032020.

%K sign

%O 0,7

%A _N. J. A. Sloane_, Feb 24 2017

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 6 00:26 EDT 2024. Contains 375701 sequences. (Running on oeis4.)