OFFSET
0,2
COMMENTS
For a guide to related sequences, see A212959.
Also, integer values of (m^3+1)/3 for m>0. - Bruno Berselli, Jan 19 2013
LINKS
Index entries for linear recurrences with constant coefficients, signature (3,-3,2,-3,3,-1).
FORMULA
a(n) = (n+2)*(n+1)*n/3 + floor((n-1)/3) + 1.
a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3) - 3*a(n-4) + 3*a(n-5) - a(n-6).
G.f.: 3*x*(1 + x^2)/((1 - x)^4*(1 + x + x^2)).
a(n) + A213397(n) = (n+1)^3.
a(n) = 3*A060999(n). - Bruno Berselli, Dec 22 2017
MATHEMATICA
t = Compile[{{n, _Integer}}, Module[{s = 0}, (Do[If[2 w < Abs[x + y - w], s = s + 1], {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]]; m = Map[t[#] &, Range[0, 60]]
CoefficientList[ Series[(3 (x + x^3))/((-1 + x)^4 (1 + x + x^2)), {x, 0, 41}], x] (* or *)
LinearRecurrence[{3, -3, 2, -3, 3, -1}, {0, 3, 9, 21, 42, 72}, 41] (* Robert G. Wilson v, Dec 22 2017 *)
PROG
(PARI) x='x+O('x^99); concat([0], Vec(3*x*(1+x^2)/((1-x)^4*(1+x+x^2)))) \\ Altug Alkan, Dec 22 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jun 12 2012
EXTENSIONS
Corrected the title. Robert G. Wilson v, Dec 22 2017
STATUS
approved