OFFSET
0,3
COMMENTS
Union of [1, 2] and A195021.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Bruno Berselli, Illustration of initial terms: An origin of A195030
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
G.f.: x*(1-x+30*x^3-2*x^4)/(1-x)^3. - Bruno Berselli, Oct 18 2011
MATHEMATICA
Join[{0, 1, 2}, Table[(n-2)*(14*n-39), {n, 3, 50}]] (* Vincenzo Librandi, Jul 10 2012 *)
PROG
(Magma) [0, 1, 2] cat[(n-2)*(14*n-39): n in [3..50]]; // Vincenzo Librandi, Jul 10 2012
(PARI) a(n)=if(n, ([0, 1, 0; 0, 0, 1; 1, -3, 3]^n*[0; 1; 2])[1, 1], 0) \\ Charles R Greathouse IV, Oct 16 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Oct 18 2011
EXTENSIONS
Both sequence (based on A195021) and definition suggested by Bruno Berselli, Oct 18 2011
STATUS
approved