OFFSET
0,2
COMMENTS
LINKS
Wikipedia, Cunningham Project
Index entries for linear recurrences with constant coefficients, signature (13, -39, 27).
FORMULA
a(n) = 13*a(n-1) - 39*a(n-2) + 27*a(n-3).
G.f.: (1 + 3*x)^2/((1 - x)*(1 - 3*x)*(1 - 9*x)).
MATHEMATICA
Table[3^(2n+1) - 3^(n+1) + 1, {n, 0, 30}]
LinearRecurrence[{13, -39, 27}, {1, 19, 217}, 30] (* Harvey P. Dale, Mar 17 2013 *)
PROG
(PARI) Vec((1 + 3*x)^2/((1 - x)*(1 - 3*x)*(1 - 9*x)) + O(x^30)) \\ Michel Marcus, Feb 12 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Stuart Clary, Dec 27 2012
STATUS
approved