A191900 Number of compositions of odd natural numbers into 7 parts <=n.
0, 64, 1093, 8192, 39062, 139968, 411771, 1048576, 2391484, 5000000, 9743585, 17915904, 31374258, 52706752, 85429687, 134217728, 205169336, 306110016, 446935869, 640000000, 900544270, 1247178944, 1702412723, 2293235712, 3051757812, 4015905088
Offset: 0
Examples
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.
Links
- Adi Dani, Restricted compositions of natural numbers
- Index entries for linear recurrences with constant coefficients, signature (7,-20,28,-14,-14,28,-20,7,-1).
Programs
-
Mathematica
Table[Floor[1/2*((n + 1)^7 - (1 + (-1)^n)/2)], {n, 0, 25}]
-
PARI
a(n)=((n+1)^7-(1+(-1)^n)/2)/2 \\ Charles R Greathouse IV, Jul 06 2017
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