OFFSET
0,1
COMMENTS
a(n) is the result of taking five consecutive numbers starting at n-2, then adding the products of the first and the last and of the second with the fourth and finally adding the middle term. That is, a(n) = (n^2-4) + (n^2-1) + n. - J. M. Bergot, Mar 06 2018
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..5000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
A100035(a(n)) = 4 for n>3;
a(n) = 2*a(n-1)-a(n-2)+4; a(0)=-5, a(1)=-2. - Vincenzo Librandi, Dec 26 2010
G.f.: (-5 + 13*x - 4*x^2)/(1 - x)^3. - Arkadiusz Wesolowski, Dec 25 2011
E.g.f.: (2*x^2 + 3*x - 5)*exp(x). - G. C. Greubel, Jul 15 2017
MAPLE
[seq(2*n^2+n-5, n=0..50)]; # Muniru A Asiru, Mar 20 2018
MATHEMATICA
Table[2*n^2 + n - 5, {n, 0, 50}] (* G. C. Greubel, Jul 15 2017 *)
LinearRecurrence[{3, -3, 1}, {-5, -2, 5}, 50] (* Harvey P. Dale, Sep 21 2017 *)
PROG
(Magma) [ 2*n^2+n-5: n in [0..50] ];
(PARI) a(n)=2*n^2+n-5 \\ Charles R Greathouse IV, Sep 24 2015
(GAP) List([0..50], n->2*n^2+n-5); # Muniru A Asiru, Mar 20 2018
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Reinhard Zumkeller, Oct 31 2004
STATUS
approved