OFFSET
4,2
LINKS
Colin Barker, Table of n, a(n) for n = 4..1000
Index entries for linear recurrences with constant coefficients, signature (8, -24, 32, -16).
FORMULA
a(n) = C(n-3, 1)2^(n-4) + C(n-3, 1)2^(n-5) + C(n-3, 2)2^(n-7) for n<4, a(n) = 0.
G.f.: x^4*(1 - 3*x + 2*x^2 + x^3) / (1 - 2*x)^4. Corrected by Colin Barker, Feb 13 2017
From Colin Barker, Feb 13 2017: (Start)
a(n) = 2^(n-8)*(-120 + 38*n - 3*n^2 + n^3) / 3 for n>3.
a(n) = 8*a(n-1) - 24*a(n-2) + 32*a(n-3) - 16*a(n-4) for n>7.
(End)
MATHEMATICA
LinearRecurrence[{8, -24, 32, -16}, {1, 5, 18, 57}, 30] (* Harvey P. Dale, Apr 22 2024 *)
PROG
(PARI) a(n)=if(n<4, 0, 2^(n-4)*binomial(n-3, 1)+2^(n-5)*binomial(n-3, 2)+2^(n-7)*binomial(n-4, 3))
(PARI) Vec(x^4*(1 - 3*x + 2*x^2 + x^3) / (1 - 2*x)^4 + O(x^30)) \\ Colin Barker, Feb 13 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ralf Stephan, Apr 28 2004
STATUS
approved