cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A213396 Number of (w,x,y) with all terms in {0,...,n} and 2*w < |x+y-w|.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jun 12 2012

Keywords

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

Crossrefs

Programs

  • 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 *)
  • 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

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

Extensions

Corrected the title. Robert G. Wilson v, Dec 22 2017