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
a(1)=1, a(2)=27, a(n) = 26*a(n-1) -169*a(n-2) +1. - Vincenzo Librandi, Oct 23 2012
G.f.: x/((1-x)*(1-13*x)^2). - Vincenzo Librandi, Oct 23 2012
a(1)=1, a(2)=27, a(3)=534, a(n)=27*a(n-1)-195*a(n-2)+169*a(n-3). - Harvey P. Dale, Jan 20 2015
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