OFFSET
0,3
COMMENTS
Equals the INVERT transform of (1, -1, 3, -3, 3, -3, ...) (with infinitely repeating 3, -3).
REFERENCES
K. Rosen, Discrete Mathematics and Its Applications, McGraw-Hill Science/Engineering/Math; 6 edition (Jul 26 2006), Section 4.3 Exercise 6b
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,0,2).
FORMULA
MATHEMATICA
f[n_] := 2^(Floor[n/3] + Mod[n, 3]/2) Mod[1 - Mod[n, 3], 2]; Array[f, 60, 0] (* Robert G. Wilson v, Aug 03 2010 *)
PROG
(PARI) a(n)=[1, 0, 2][n%3+1]<<(n\3) \\ Charles R Greathouse IV, Jul 12 2016
(PARI) Vec((1+2*x^2)/(1-2*x^3) + O(x^50)) \\ Colin Barker, Aug 21 2016
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
_Frank Cheng_, Nov 18 2009
EXTENSIONS
More terms from Robert G. Wilson v, Aug 03 2010
STATUS
approved