OFFSET
0,5
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).
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
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 *)
PROG
(Magma) [Floor(n*(n-1)*(n-2)/9): n in [0..50]]; // Vincenzo Librandi, Feb 23 2017
(SageMath) [2*binomial(n, 3)//3 for n in range(51)] # G. C. Greubel, Oct 06 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved