OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..200
Index entries for linear recurrences with constant coefficients, signature (27, -51, 25).
FORMULA
a(1)=1, a(2)=27, a(3)=678, a(n) = 27*a(n-1) - 51*a(n-2) + 25*a(n-3). - Vincenzo Librandi, Oct 19 2012
MATHEMATICA
LinearRecurrence[{27, -51, 25}, {1, 27, 678}, 20] (* Vincenzo Librandi, Oct 19 2012 *)
nxt[{n_, a_}]:={n+1, 25a+n+1}; NestList[nxt, {1, 1}, 20][[All, 2]] (* Harvey P. Dale, Nov 16 2021 *)
PROG
(Magma) I:=[1, 27, 678]; [n le 3 select I[n] else 27*Self(n-1) - 51*Self(n-2)+ 25*Self(n-3): n in [1..20]]; // Vincenzo Librandi, Oct 19 2012
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved