OFFSET
1,3
LINKS
FORMULA
G.f.: (-2*x^3 + 3*x^2 + x)/((1-2x) * (1+4x)). - Ralf Stephan, Jul 14 2013
a(n) = (16*2^n - (-4)^n)/48, n>0. - Ralf Stephan, Jul 18 2013
MAPLE
a[1]:=1: a[2]:=1: a[3]:=4: a[4]:=0: for n from 5 to 27 do a[n]:=12*a[n-2]-16*a[n-3] od: seq(a[n], n=1..27);
MATHEMATICA
M = {{1, -1, -1, 1}, {-1, 1, -1, 1}, {-1, -1, 1, 1}, {1, 1, 1, -3}}; v[1] = {1, 0, 0, 0}; v[n_] := v[n] = M.v[n - 1]; a1 = Table[v[n][[1]], {n, 1, 50}]
LinearRecurrence[{-2, 8}, {1, 1, 4}, 30] (* Harvey P. Dale, Apr 23 2015 *)
nxt[{a_, b_, c_, d_}]:={b, c, d, 12c-16b}; NestList[nxt, {1, 1, 4, 0}, 30][[;; , 1]] (* Harvey P. Dale, Jul 21 2024 *)
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Roger L. Bagula, Sep 23 2006
EXTENSIONS
Edited by N. J. A. Sloane, Oct 08 2006
STATUS
approved