OFFSET
0,3
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (2,2,-6,0,6,-2,-2,1).
FORMULA
a(n) = (230*n^4 + 70*n^2 + 27 - (30*n^2 + 27)*(-1)^n)/384 = A077042(n, 5).
a(n) = 2*a(n-1) + 2*a(n-2) - 6*a(n-3) + 6*a(n-5) - 2*a(n-6) - 2*a(n-7) + a(n-8).
G.f.: -x*(1 + 8*x + 29*x^2 + 39*x^3 + 29*x^4 + 8*x^5 + x^6) / ( (1+x)^3*(x-1)^5 ). - R. J. Mathar, Sep 04 2011
EXAMPLE
a(2)=10 since the compositions of floor(5*(2+1)/2) = 7 into exactly 5 positive integers each no more than 2 are: 1+1+1+2+2, 1+1+2+1+2, 1+1+2+2+1, 1+2+1+1+2, 1+2+1+2+1, 1+2+2+1+1, 2+1+1+1+2, 2+1+1+2+1, 2+1+2+1+1, 2+2+1+1+1.
MATHEMATICA
LinearRecurrence[{2, 2, -6, 0, 6, -2, -2, 1}, {0, 1, 10, 51, 155, 381, 780, 1451}, 40] (* Harvey P. Dale, Mar 05 2015 *)
PROG
(Magma) [(230*n^4+70*n^2+27-(30*n^2+27)*(-1)^n)/384: n in [0..40]]; // Vincenzo Librandi, Sep 05 2011
(PARI) a(n)=(230*n^4+70*n^2-30*n^2*(-1)^n)\/384 \\ Charles R Greathouse IV, Sep 25 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Henry Bottomley, Oct 22 2002
STATUS
approved