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.

A213388 Number of (w,x,y) with all terms in {0,...,n} and 2|w-x| >= max(w,x,y)-min(w,x,y).

Original entry on oeis.org

1, 6, 21, 48, 93, 158, 249, 368, 521, 710, 941, 1216, 1541, 1918, 2353, 2848, 3409, 4038, 4741, 5520, 6381, 7326, 8361, 9488, 10713, 12038, 13469, 15008, 16661, 18430, 20321, 22336, 24481, 26758, 29173, 31728, 34429, 37278, 40281, 43440, 46761, 50246, 53901
Offset: 0

Views

Author

Clark Kimberling, Jun 11 2012

Keywords

Comments

a(n)+A171218(n) = (n+1)^3.
For a guide to related sequences, see A212959.

Crossrefs

Cf. A212959.

Programs

  • Mathematica
    t = Compile[{{n, _Integer}}, Module[{s = 0},
        (Do[If[Max[w, x, y] - Min[w, x, y] <= 2 Abs[w - x], s = s + 1], {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];
    m = Map[t[#] &, Range[0, 45]]   (* A213388 *)
  • PARI
    Vec((1+3*x+5*x^2-x^3)/((1-x)^4*(1+x)) + O(x^100)) \\ Colin Barker, Jan 28 2016

Formula

a(n) = 3*a(n-1)-2*a(n-2)-2*a(n-3)+3*a(n-4)-a(n-5).
G.f.: ((1 + 3*x + 5*x^2 + x^3)/((1 - x)^4*(1 + x))).
From Colin Barker, Jan 28 2016: (Start)
a(n) = (8*n^3+30*n^2+28*n+3*((-1)^n+3))/12.
a(n) = (4*n^3+15*n^2+14*n+6)/6 for n even.
a(n) = (4*n^3+15*n^2+14*n+3)/6 for n odd.
(End)