OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (9,1,-9).
FORMULA
From Colin Barker, Dec 27 2012: (Start)
a(n) = (3^(1+2*n) + 2*(-1)^n - 5)/20.
a(n) = 9*a(n-1) + a(n-2) - 9*a(n-3).
G.f.: x*(3*x+1) / ((x-1)*(x+1)*(9*x-1)). (End)
E.g.f.: (3*(cosh(9*x) - cosh(x) + sinh(9*x)) - 7*sinh(x))/20. - Stefano Spezia, Oct 25 2023
MATHEMATICA
CoefficientList[Series[(3 x + 1)/((x - 1) (x + 1) (9 x - 1)), {x, 0, 30}], x] (* Vincenzo Librandi, Oct 22 2013 *)
Module[{nn=30, d}, d=PadRight[{}, nn, {1, 3}]; Table[FromDigits[Take[d, n], 9], {n, nn}]] (* Harvey P. Dale, Jul 22 2015 *)
PROG
(Magma) [(3^(1+2*n)+2*(-1)^n-5)/20: n in [1..30]]; // Vincenzo Librandi, Oct 22 2013
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
EXTENSIONS
More terms from Colin Barker, Dec 27 2012
STATUS
approved