OFFSET
0,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (9,0,1,-9)
FORMULA
a(n) = A046530(9^n) = A046631(2n). G.f. ( 1-6*x-6*x^2-21*x^3 ) / ( (x-1)*(9*x-1)*(1+x+x^2) ). - R. J. Mathar, Feb 28 2011
If n>=1, a(n) = 9*a(n-1) -6 if n is not a multiple of 3, otherwise a(n) = 9*a(n-1) -20. - Vincenzo Librandi, Mar 18 2011
MATHEMATICA
LinearRecurrence[{9, 0, 1, -9}, {1, 3, 21, 169}, 30] (* Harvey P. Dale, Oct 09 2017 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved