OFFSET
0,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (7,-20,28,-14,-14,28,-20,7,-1).
FORMULA
a(n) = ((n + 1)^7 - (1 + (-1)^n)/2)/2.
G.f.: x*(64+645*x+1821*x^2+1786*x^3+666*x^4+57*x^5+x^6) / ( (1+x)*(x-1)^8 ). - R. J. Mathar, Jun 22 2011
EXAMPLE
a(1)=64: the 64 compositions of odd numbers into 7 parts <=1
1:(0,0,0,0,0,0,1)-->7!/(6!1!)= 7
3:(0,0,0,0,1,1,1)-->7!/(4!3!)=35
5:(0,0,1,1,1,1,1)-->7!/(2!5!)=21
7:(1,1,1,1,1,1,1)-->7!/(0!7!)= 1.
MATHEMATICA
Table[Floor[1/2*((n + 1)^7 - (1 + (-1)^n)/2)], {n, 0, 25}]
PROG
(PARI) a(n)=((n+1)^7-(1+(-1)^n)/2)/2 \\ Charles R Greathouse IV, Jul 06 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Adi Dani, Jun 19 2011
STATUS
approved