OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
Empirical g.f.: x*(x^4-5*x^3-7*x-1) / ((x-1)^5*(x^2+x+1)). - Colin Barker, Aug 15 2014
From Robert Israel, Dec 30 2016: (Start)
a(n) = floor(A024197(n)/(n+2)^2) = floor(n*(n+1)*(n^2+3*n+1)/6).
a(n) = (n^4+4*n^3+4*n^2+n-4)/6 if n == 1 (mod 3).
Otherwise a(n) = n*(n+1)*(n^2+3*n+1)/6.
The empirical g.f. can be obtained from this. (End)
MAPLE
f:= proc(n)
if n mod 3 = 1 then (n^4+4*n^3+4*n^2+n-4)/6
else n*(n+1)*(n^2+3*n+1)/6
fi
end proc:
map(f, [$1..100]); # Robert Israel, Dec 30 2016
MATHEMATICA
Table[Floor[n*(n + 1)*(n^2 + 3*n + 1)/6], {n, 1, 50}] (* G. C. Greubel, Dec 30 2016 *)
PROG
(PARI) for(n=1, 25, print1(floor(n*(n+1)*(n^2+3*n+1)/6), ", ")) \\ G. C. Greubel, Dec 30 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved