OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
Adi Dani, Restricted compositions of natural numbers.
Index entries for linear recurrences with constant coefficients, signature (4,-5,0,5,-4,1).
FORMULA
a(n) = ((n + 1)^4 - (1 + (-1)^n)/2)/2.
From R. J. Mathar, Jun 22 2011: (Start)
G.f.: 8*x*(1+x+x^2) / ( (1+x)*(1-x)^5 ).
a(n) = 8*A011863(n+1). (End)
a(n) = floor((n+1)^4/2). - Wesley Ivan Hurt, Jun 14 2013
Sum_{n>=1} 1/a(n) = 3/4 + Pi^4/720 - tanh(Pi/2)*Pi/4. - Amiram Eldar, Aug 13 2022
EXAMPLE
a(1) = 8 compositions of odd numbers into 4 parts < 1.
1:(0,0,0,1),(0,0,1,1),(0,1,0,0),(1,0,0,0)
3:(0,1,1,1),(1,0,1,1),(1,1,0,1),(1,1,1,0)
MATHEMATICA
Table[Floor[1/2*((n + 1)^4 - (1 + (-1)^n)/2)], {n, 0, 30}]
PROG
(Magma) [((n + 1)^4 - (1 + (-1)^n)/2)/2: n in [0..50]]; // Vincenzo Librandi, Jul 04 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Adi Dani, Jun 19 2011
STATUS
approved