OFFSET
1,2
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1).
FORMULA
G.f.: x^2*(2+x+5*x^2)/((1-x)^2*(1+x+x^2)). - Colin Barker, May 13 2012
From Wesley Ivan Hurt, Jun 09 2016: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
a(n) = (24*n-33-12*cos(2*n*Pi/3)+2*sqrt(3)*sin(2*n*Pi/3))/9.
a(3k) = 8k-5, a(3k-1) = 8k-6, a(3k-2) = 8k-8. (End)
MAPLE
A047474:=n->(24*n-33-12*cos(2*n*Pi/3)+2*sqrt(3)*sin(2*n*Pi/3))/9: seq(A047474(n), n=1..100); # Wesley Ivan Hurt, Jun 09 2016
MATHEMATICA
Select[Range[0, 150], MemberQ[{0, 2, 3}, Mod[#, 8]]&] (* Harvey P. Dale, Apr 08 2013 *)
PROG
(Magma) [n : n in [0..150] | n mod 8 in [0, 2, 3]]; // Wesley Ivan Hurt, Jun 09 2016
(PARI) concat(0, Vec(x^2*(2+x+5*x^2)/((1-x)^2*(1+x+x^2)) + O(x^100))) \\ Colin Barker, Jun 12 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved