OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..200
Index entries for linear recurrences with constant coefficients, signature (21, -39, 19).
FORMULA
a(1)=1, a(2)=21, a(3)=402, a(n) = 21*a(n-1) - 39*a(n-2) + 19*a(n-3). - Vincenzo Librandi, Oct 20 2012
MATHEMATICA
LinearRecurrence[{21, -39, 19}, {1, 21, 402}, 20] (* Vincenzo Librandi, Oct 20 2012 *)
PROG
(Magma) I:=[1, 21, 402]; [n le 3 select I[n] else 21*Self(n-1) - 39*Self(n-2) + 19*Self(n-3): n in [1..20]]; // Vincenzo Librandi, Oct 20 2012
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved