login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


A213396
Number of (w,x,y) with all terms in {0,...,n} and 2*w < |x+y-w|.
2
0, 3, 9, 21, 42, 72, 114, 171, 243, 333, 444, 576, 732, 915, 1125, 1365, 1638, 1944, 2286, 2667, 3087, 3549, 4056, 4608, 5208, 5859, 6561, 7317, 8130, 9000, 9930, 10923, 11979, 13101, 14292, 15552, 16884, 18291, 19773, 21333, 22974, 24696
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
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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 20 18:47 EDT 2024. Contains 376075 sequences. (Running on oeis4.)