OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
L. Kaylor and D. Offner, Counting matrices over a finite field with all eigenvalues in the field, Involve, a Journal of Mathematics, Vol. 7 (2014), No. 5, 627-645, DOI: 10.2140/involve.2014.7.627; see Eq. (1).
Index entries for linear recurrences with constant coefficients, signature (5,-10,10,-5,1).
FORMULA
G.f.: x*(1+9*x+3*x^2-x^3)/(1-x)^5. - Vincenzo Librandi, Sep 05 2015
a(n) = 5*a(n-1) -10*a(n-2) +10*a(n-3) -5*a(n-4) +a(n-5). - Vincenzo Librandi, Sep 05 2015
a(n) = Sum_{k=n..n+n^2-1} k (the sum of the first n^2 integers starting with n). - Matthew Niemiro, Jun 26 2020
E.g.f.: (x/2)*(2 +12*x +8*x^2 +x^3)*exp(x). - G. C. Greubel, Sep 24 2021
MATHEMATICA
Table[n^4/2 + n^3 - n^2/2, {n, 0, 60}] (* or *) CoefficientList[Series[x (1 + 9 x + 3 x^2 - x^3)/(1 - x)^5, {x, 0, 45}], x] (* Vincenzo Librandi, Sep 05 2015 *)
LinearRecurrence[{5, -10, 10, -5, 1}, {0, 1, 14, 63, 184}, 50] (* Harvey P. Dale, Nov 11 2017 *)
PROG
(PARI) a(n) = n^4/2+n^3-n^2/2; \\ Michel Marcus, Sep 05 2015
(Magma) [n^4/2+n^3-n^2/2: n in [0..40]] // Vincenzo Librandi, Sep 05 2015
(Sage) [n^2*(n^2 +2*n -1)/2 for n in (0..40)] # G. C. Greubel, Sep 24 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Mar 13 2015
STATUS
approved