A160378 a(n) = n^3 - n*(n+1)/2.
0, 0, 5, 21, 54, 110, 195, 315, 476, 684, 945, 1265, 1650, 2106, 2639, 3255, 3960, 4760, 5661, 6669, 7790, 9030, 10395, 11891, 13524, 15300, 17225, 19305, 21546, 23954, 26535, 29295, 32240, 35376, 38709, 42245, 45990, 49950, 54131, 58539
Offset: 0
Examples
a(4) = 4^3 - 4*5/2 = 64 - 10 = 54.
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Milan Janjic and B. Petkovic, A counting function, arXiv preprint arXiv:1301.4550 [math.CO], 2013.
- Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
Programs
-
Magma
[ n^3-n*(n+1)/2: n in [0..50] ];
-
Mathematica
Table[n^3 - n*(n+1)/2, {n,0,40}] (* Vladimir Joseph Stephan Orlovsky, Jun 25 2009 *)
-
PARI
a(n)=n^3-n*(n+1)/2 \\ Charles R Greathouse IV, Oct 18 2022
-
SageMath
[n^3 -binomial(n+1,2) for n in range(41)] # G. C. Greubel, Oct 14 2023
Formula
a(n) = (2*n^3 - n^2 - n)/2. - Vincenzo Librandi, Dec 12 2010; edited by Klaus Brockhaus, Dec 12 2010
From Chai Wah Wu, Aug 03 2022: (Start)
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n > 3.
G.f.: x^2*(5 + x)/(1 - x)^4. (End)
E.g.f.: (x^2/2)*(5 + 2*x)*exp(x). - G. C. Greubel, Oct 14 2023
Extensions
Definition clarified and offset changed from 1 to 0 by Klaus Brockhaus, Dec 12 2010
Comments