A011891 a(n) = floor(n*(n-1)*(n-2)/9).
0, 0, 0, 0, 2, 6, 13, 23, 37, 56, 80, 110, 146, 190, 242, 303, 373, 453, 544, 646, 760, 886, 1026, 1180, 1349, 1533, 1733, 1950, 2184, 2436, 2706, 2996, 3306, 3637, 3989, 4363, 4760, 5180, 5624, 6092, 6586, 7106, 7653, 8227, 8829, 9460, 10120, 10810, 11530
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..2000
- Index entries for linear recurrences with constant coefficients, signature (4,-6,3,3,-6,3,3,-6,4,-1).
Crossrefs
Cf. A011886.
Programs
-
Magma
[Floor(n*(n-1)*(n-2)/9): n in [0..50]]; // Vincenzo Librandi, Feb 23 2017
-
Mathematica
Table[Floor[(n(n-1)(n-2))/9],{n,0,40}] (* or *) LinearRecurrence[{4,-6,3,3,-6,3,3,-6,4,-1}, {0,0,0,0,2,6,13,23,37,56}, 50] (* Harvey P. Dale, Feb 20 2017 *)
-
SageMath
[2*binomial(n,3)//3 for n in range(51)] # G. C. Greubel, Oct 06 2024
Formula
G.f.: x^4*(2-2*x+x^2+x^3-x^4+x^5)/((1+x^3+x^6)*(1-x)^4). [Maksym Voznyy (voznyy(AT)mail.ru), Jul 27 2009]
Third differences are [-2, 4] repeated. - M. F. Hasler, Sep 15 2009