OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..300
Index entries for linear recurrences with constant coefficients, signature (8, -18, 16, -5).
FORMULA
a(n) = 8*a(n-1) - 18*a(n-2) + 16*a(n-3) - 5*a(n-4).
MATHEMATICA
Table[5^n-n^2, {n, 0, 20}] (* or *) LinearRecurrence[{8, -18, 16, -5}, {1, 4, 21, 116}, 30] (* Harvey P. Dale, Nov 22 2012 *)
PROG
(Magma) [5^n-n^2: n in [0..35]]; // Vincenzo Librandi, Jun 12 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved