OFFSET
0,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Piezas, Tito III and Weisstein, Eric W., Pentanacci Number
Index entries for linear recurrences with constant coefficients, signature (1,1,1,1,1).
FORMULA
MATHEMATICA
a[n_] := a[n] = a[n - 1] + a[n - 2] + a[n - 3] + a[n - 4] + a[n - 5]; a[0] = -2; a[1] = -1; a[2] = 0; a[3] = 1; a[4] = 2; Table[a[n], {n, 0, 50}] (* Artur Jasinski, Nov 15 2007 *)
LinearRecurrence[{1, 1, 1, 1, 1}, {-2, -1, 0, 1, 2}, 50] (* G. C. Greubel, Sep 21 2016 *)
PROG
(Magma) I:=[-2, -1, 0, 1, 2]; [n le 5 select I[n] else Self(n-1)+Self(n-2)+Self(n-3)+Self(n-4)+Self(n-5): n in [1..40]]; // Vincenzo Librandi, Sep 22 2016
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Artur Jasinski, Nov 15 2007
STATUS
approved