OFFSET
0,5
COMMENTS
From a competency test.
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,0,4,0,0,-6,0,0,4,0,0,-1).
FORMULA
From Colin Barker, Jan 24 2017: (Start)
a(n) = 4*a(n-3) - 6*a(n-6) + 4*a(n-9) - a(n-12) for n>11.
G.f.: x^3*(1 + 3*x + 9*x^2 - 2*x^3 - 4*x^4 - 4*x^5 + x^6 + x^7 + x^8) / ((1 - x)^4*(1 + x + x^2)^4).
(End)
MAPLE
a:=proc(n): if n mod 3=0 then n/3 elif n mod 3 = 1 then (n+5)*a(n-1)/3 else (n+4)*a(n-1)/3 fi end: seq(a(n), n=0..75); # Emeric Deutsch, Jan 01 2007
MATHEMATICA
LinearRecurrence[{0, 0, 4, 0, 0, -6, 0, 0, 4, 0, 0, -1}, {0, 0, 0, 1, 3, 9, 2, 8, 32, 3, 15, 75}, 70] (* Harvey P. Dale, Jul 31 2018 *)
PROG
(PARI) concat(vector(3), Vec(x^3*(1 + 3*x + 9*x^2 - 2*x^3 - 4*x^4 - 4*x^5 + x^6 + x^7 + x^8) / ((1 - x)^4*(1 + x + x^2)^4) + O(x^100))) \\ Colin Barker, Jan 24 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Trent Stratton (trent.stratton(AT)gov.bc.ca), Dec 08 2006
EXTENSIONS
Solution from N. J. A. Sloane, Dec 08 2006
More terms from Emeric Deutsch, Jan 01 2007
STATUS
approved