OFFSET
0,2
LINKS
FORMULA
a(n) = a(n-1) + 3a(n-2) - a(n-3) for n>3; G.f.: (1+x-3x^2+x^3)/(1-x-3x^2+x^3).
EXAMPLE
a(4)=12 since ((1+2+2+8)^2 - (1^2+2^2+2^2+8^2))/8 = (13^2-73)/8 = 12.
MATHEMATICA
LinearRecurrence[{1, 3, -1}, {1, 2, 2, 8}, 40] (* Harvey P. Dale, Mar 24 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Sep 16 2003
STATUS
approved