OFFSET
0,1
REFERENCES
R. K. Guy, personal communication.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,1,-2)
FORMULA
From R. J. Mathar, Aug 22 2008: (Start)
O.g.f.: (4 - 3*x^2)/(1 - 3*x - x^2 + 2*x^3).
MATHEMATICA
LinearRecurrence[{3, 1, -2}, {4, 12, 37}, 30] (* Harvey P. Dale, Jan 17 2017 *)
PROG
(Magma) I:=[4, 12, 37]; [n le 3 select I[n] else 3*Self(n-1)+Self(n-2)-2*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Jan 18 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved