OFFSET
0,3
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n) = n^3 + n^2 - n = n*A028387(n-1).
a(n) = A081437(n-1), n>0. - R. J. Mathar, Sep 12 2008
G.f.: x*(1+6*x-x^2)/(1-x)^4. - Robert Israel, Dec 05 2014
E.g.f.: x*(1+4*x+x^2)*exp(x). - Robert Israel, Dec 05 2014
For q a prime power, a(q) is the number of pairs of commuting nilpotent 2*2 matrices with coefficients in GL(q). (Proof: the zero matrix commutes with all q^2 nilpotent matrices, each of the remaining q^2-1 nilpotent matrices commutes with exactly q nilpotent matrices.) - Mark Wildon, Jun 18 2017
EXAMPLE
a(2) = 10 because we can write a(2) = 2^3 + 2^2 - 2 = 10.
MAPLE
a:=n->sum(n*k, k=0..n):seq(a(n)+sum(n*k, k=2..n), n=0..30); # Zerinvary Lajos, Jun 10 2008
a:=n->sum(-2+sum(2+sum(2, j=1..n), j=1..n), j=1..n):seq(a(n)/2, n=0..40); # Zerinvary Lajos, Dec 06 2008
seq(n^3+n^2-n, n=0..100); # Robert Israel, Dec 05 2014
MATHEMATICA
LinearRecurrence[{4, -6, 4, -1}, {0, 1, 10, 33}, 60] (* Vincenzo Librandi, Jun 22 2017 *)
PROG
(Magma) [n^3+n^2-n: n in [0..50]]; // Vincenzo Librandi, Jun 22 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Polina S. Dolmatova (polinasport(AT)mail.ru), Aug 15 2003
STATUS
approved