login
a(n) = (n - 1)*(n^2 + n - 1).
7

%I #34 Sep 08 2022 08:44:51

%S 1,0,5,22,57,116,205,330,497,712,981,1310,1705,2172,2717,3346,4065,

%T 4880,5797,6822,7961,9220,10605,12122,13777,15576,17525,19630,21897,

%U 24332,26941,29730,32705,35872,39237,42806,46585,50580,54797,59242,63921

%N a(n) = (n - 1)*(n^2 + n - 1).

%C Binomial transform of 1, -6, 6, 0, 0, 0, (0 continued). - _R. J. Mathar_, Nov 29 2015

%D Graham et al., Handbook of Combinatorics, Vol. 2, p. 1243.

%H Vincenzo Librandi, <a href="/A033445/b033445.txt">Table of n, a(n) for n = 0..780</a>

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4,-6,4,-1).

%F a(0)=1, a(1)=0, a(2)=5; for n>2, a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) + 6. - _Gionata Neri_, May 12 2015

%F From _Robert Israel_, May 12 2015: (Start)

%F O.g.f.: (1 - 4*x + 11*x^2 - 2*x^3)/(1-x)^4.

%F E.g.f.: (1 - x + 3*x^2 + x^3)*exp(x). (End)

%p [seq (1-2*n+n^3, n=0..60)]; # _Zerinvary Lajos_, May 28 2006

%t Table[(n - 1) (n^2 + n - 1), {n, 0, 40}] (* _Michael De Vlieger_, May 12 2015 *)

%t LinearRecurrence[{4,-6,4,-1},{1,0,5,22},50] (* _Harvey P. Dale_, Dec 28 2021 *)

%o (Magma) [(n-1)*(n^2+n-1): n in [0..40]]; // _Vincenzo Librandi_, Apr 27 2011

%o (PARI) vector(50, n, n--; (n-1)*(n^2+n-1)) \\ _Anders Hellström_, Nov 29 2015

%K nonn,easy

%O 0,3

%A _N. J. A. Sloane_