OFFSET
0,3
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,7,0,0,-1).
FORMULA
MATHEMATICA
a[0] = 0; a[1] = 1;
a[n_] := a[n] = If[Mod[n, 3] == 1, 2*a[n - 1] + a[n - 2], If[Mod[n, 3] == 0, a[n - 1] + a[n - 2], 2*a[n - 1] - a[n - 2]]];
Table[a[n], {n, 0, 50}]
LinearRecurrence[{0, 0, 7, 0, 0, -1}, {0, 1, 2, 3, 8, 13}, 40] (* Harvey P. Dale, Jul 17 2021 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula and Gary W. Adamson, Sep 28 2008
STATUS
approved