|
|
EXAMPLE
|
a(1)=16 as there are 16 compositions of even natural numbers into 5 parts <=1:
(0,0,0,0,0);
(0,0,0,1,1), (0,0,1,0,1), (0,0,1,1,0), (0,1,1,0,0), (0,1,0,1,0), (0,1,0,0,1), (1,1,0,0,0), (1,0,1,0,0), (1,0,0,1,0), (1,0,0,0,1);
(0,1,1,1,1), (1,0,1,1,1), (1,1,0,1,1), (1,1,1,0,1), (1,1,1,1,0).
|
|
|
MATHEMATICA
|
Table[1/2*((n + 1)^5 + (1 + (-1)^n)*1/2), {n, 0, 25}]
LinearRecurrence[{5, -9, 5, 5, -9, 5, -1}, {1, 16, 122, 512, 1563, 3888, 8404}, 50] (* From Harvey P. Dale, Nov 09 2011 *)
|