OFFSET
1,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1).
FORMULA
From Chai Wah Wu, May 29 2016: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
G.f.: x*(x + 1)*(3*x^2 - x + 2)/((x - 1)^2*(x^2 + x + 1)). (End)
From Wesley Ivan Hurt, Jun 10 2016: (Start)
a(n) = 8*n/3-2-cos(2*n*Pi/3)+5*sin(2*n*Pi/3)/(3*sqrt(3)).
a(3k) = 8k-3, a(3k-1) = 8k-5, a(3k-2) = 8k-6. (End)
MAPLE
A047604:=n->8*n/3-2-cos(2*n*Pi/3)+5*sin(2*n*Pi/3)/(3*sqrt(3)): seq(A047604(n), n=1..100); # Wesley Ivan Hurt, Jun 10 2016
MATHEMATICA
Flatten[#+{2, 3, 5}&/@(8*Range[0, 20])] (* Harvey P. Dale, Oct 17 2013 *)
LinearRecurrence[{1, 0, 1, -1}, {2, 3, 5, 10}, 50] (* G. C. Greubel, May 29 2016 *)
PROG
(Magma) [n : n in [0..150] | n mod 8 in [2, 3, 5]]; // Wesley Ivan Hurt, May 29 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved