OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..900
Index entries for linear recurrences with constant coefficients, signature (27,-195,169).
FORMULA
From Vincenzo Librandi, Oct 23 2012: (Start)
a(n) = 26*a(n-1) - 169*a(n-2) + 1, a(1)=1, a(2)=27.
G.f.: x/((1-x)*(1-13*x)^2). (End)
a(n) = 27*a(n-1) - 195*a(n-2) + 169*a(n-3), a(1)=1, a(2)=27, a(3)=534. - Harvey P. Dale, Jan 20 2015
From Elmo R. Oliveira, May 16 2025: (Start)
E.g.f.: exp(x)*(1 + exp(12*x)*(156*x - 1))/144.
a(n) = (13^n*(12*n - 1) + 1)/144. (End)
MATHEMATICA
CoefficientList[Series[1/((1 - x)(1 - 13*x)^2), {x, 0, 900}], x] (* Vincenzo Librandi, Oct 23 2012 *)
RecurrenceTable[{a[1]==1, a[n]==n*13^(n-1)+a[n-1]}, a, {n, 20}] (* or *) LinearRecurrence[{27, -195, 169}, {1, 27, 534}, 20] (* Harvey P. Dale, Jan 20 2015 *)
PROG
(Magma) I:=[1, 27]; [n le 2 select I[n] else 26*Self(n-1)-169*Self(n-2)+1: n in [1..20]]; // Vincenzo Librandi, Oct 23 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved
