OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (5,-9,5,5,-9,5,-1).
FORMULA
a(n) = ((n + 1)^5 - (1 + (-1)^n)/2)/2.
From R. J. Mathar, Jun 22 2011: (Start)
G.f.: x*(16 + 41*x + 51*x^2 + 11*x^3 + x^4) / ( (1+x)*(x-1)^6 ). (End)
EXAMPLE
a(1)=16: the 16 compositions of odd numbers into 5 parts <= 1 are
1: (0,0,0,0,1) --> 5!/(4!1!) = 5;
3: (0,0,1,1,1) --> 5!/(2!3!) = 10;
5: (1,1,1,1,1) --> 5!/(0!5!) = 1.
MATHEMATICA
Table[Floor[1/2*((n + 1)^5 - (1 + (-1)^n)/2)], {n, 0, 30}]
PROG
(Magma) [((n + 1)^5 - (1 + (-1)^n)/2)/2: n in [0..50]]; // Vincenzo Librandi, Jul 04 2011
(PARI) a(n)=((n+1)^5-(1+(-1)^n)/2)/2 \\ Charles R Greathouse IV, Jul 06 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Adi Dani, Jun 19 2011
STATUS
approved