OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..200
Index entries for linear recurrences with constant coefficients, signature (19,-35,17).
FORMULA
a(1)=1, a(2)=19, a(3)=326, a(n)=19*a(n-1)-35*a(n-2)+17*a(n-3). - Vincenzo Librandi, Oct 20 2012
MAPLE
a:=n->sum((17^(n-j)-1)/16, j=0..n): seq(a(n), n=1..16); # Zerinvary Lajos, Jan 05 2007
a:= n-> (Matrix([[1, 0, 1], [1, 1, 1], [0, 0, 17]])^n)[2, 3]:
seq(a(n), n=1..16); # Alois P. Heinz, Aug 06 2008
MATHEMATICA
LinearRecurrence[{19, -35, 17}, {1, 19, 326}, 20] (* Vincenzo Librandi, Oct 20 2012 *)
nxt[{n_, a_}]:={n+1, 17a+n+1}; NestList[nxt, {1, 1}, 20][[All, 2]] (* Harvey P. Dale, Jun 19 2021 *)
PROG
(Magma) I:=[1, 19, 326]; [n le 3 select I[n] else 19*Self(n-1) - 35*Self(n-2) + 17*Self(n-3): n in [1..20]]; // Vincenzo Librandi, Oct 20 2012
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved