OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,4,-8,-3,6).
FORMULA
From Ralf Stephan, Aug 29 2004: (Start)
a(n) = (1/12)*(3^((n+1)/2) + 3^((n+2)/2) + 2^(n+1) + (-1)^n + 3), n > 0.
G.f.: (1 - x - 4*x^2 + 3*x^3 + 3*x^4 - x^5)/((1-x^2)*(1-2*x)*(1-3*x^2)). (End)
a(n) = 2*a(n-1) + 4*a(n-2) - 8*a(n-3) - 3*a(n-4) + 6*a(n-5). - Wesley Ivan Hurt, Apr 13 2021
MATHEMATICA
Sum[ Sum[ Binomial[ Floor[ n/2 ], i ], {i, r, n, 6} ]*Sum[ Binomial[ Ceiling[ n/2 ], i ], {i, r, n, 6} ], {r, 0, 5} ]
Join[{1}, LinearRecurrence[{2, 4, -8, -3, 6}, {1, 2, 3, 6, 10}, 50]] (* G. C. Greubel, Dec 31 2017 *)
PROG
(PARI) x='x+O('x^30); Vec((1-x-4*x^2+3*x^3+3*x^4-x^5)/((1-x^2)*(1-2*x)*(1-3*x^2))) \\ G. C. Greubel, Dec 31 2017
(Magma) I:=[1, 2, 3, 6, 10]; [1] cat [n le 5 select I[n] else 2*Self(n-1) + 4*Self(n-2) - 8*Self(n-3) - 3*Self(n-4) + 6*Self(n-5): n in [1..30]]; // G. C. Greubel, Dec 31 2017
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved