OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (19,-99,81).
FORMULA
From Vincenzo Librandi, Oct 23 2012: (Start)
a(n) = 18*a(n-1) - 81*a(n-2) + 1, a(1)=1, a(2)=19.
G.f.: x/((1 - x)*(1 - 9*x)^2). (End)
From Elmo R. Oliveira, May 15 2025: (Start)
E.g.f.: exp(x)*(1 + exp(8*x)*(72*x - 1))/64.
a(n) = (9^n*(8*n - 1) + 1)/64.
a(n) = 19*a(n-1) - 99*a(n-2) + 81*a(n-3) for n >= 4. (End)
MATHEMATICA
CoefficientList[Series[1/((1 - x)(1 - 9*x)^2), {x, 0, 40}], x] (* Vincenzo Librandi, Oct 23 2012 *)
PROG
(Magma) I:=[1, 19]; [n le 2 select I[n] else 18*Self(n-1) - 81*Self(n-2) + 1: n in [1..30]]; // Vincenzo Librandi, Oct 23 2012
(PARI) Vec(x/((1 - x)*(1 - 9*x)^2) + O(x^30)) \\ Jinyuan Wang, Mar 11 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved
