OFFSET
0,3
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
FORMULA
a(n) = n^4 - n^3 - n^2.
G.f.: x*(-1+9*x+15*x^2+x^3)/(1-x)^5. - R. J. Mathar, Nov 14 2007
EXAMPLE
a(7)=2009 because 7^4=2401, 7^3=343, 7^2=49 and we can write 2401-343-49=2009.
MAPLE
MATHEMATICA
f[n_]:=n^4-n^3-n^2; Table[f[n], {n, 5!}] (* Vladimir Joseph Stephan Orlovsky, Dec 04 2009 *)
CoefficientList[Series[- x (-1 + 9 x + 15 x^2 + x^3)/(-1 + x)^5, {x, 0, 50}], x] (* Vincenzo Librandi, May 21 2014 *)
LinearRecurrence[{5, -10, 10, -5, 1}, {0, -1, 4, 45, 176}, 50] (* G. C. Greubel, Sep 28 2017 *)
PROG
(Magma)[n^4-n^3-n^2: n in [0..50]]; // Vincenzo Librandi, Dec 15 2010
(PARI) x='x+O('x^50); Vec(x*(-1+9*x+15*x^2+x^3)/(1-x)^5) \\ G. C. Greubel, Sep 28 2017
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Omar E. Pol, Nov 01 2007
STATUS
approved