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.

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

Original entry on oeis.org

1, 4, 9, 16, 27, 38, 53, 70, 89, 110, 135, 160, 189, 220, 253, 288, 327, 366, 409, 454, 501, 550, 603, 656, 713, 772, 833, 896, 963, 1030, 1101, 1174, 1249, 1326, 1407, 1488, 1573, 1660, 1749, 1840, 1935, 2030, 2129, 2230, 2333, 2438, 2547, 2656
Offset: 0

Views

Author

Clark Kimberling, Jun 13 2012

Keywords

Comments

For a guide to related sequences, see A212959.

Crossrefs

Programs

  • Mathematica
    t = Compile[{{n, _Integer}}, Module[{s = 0}, (Do[If[w == Min[Abs[w - x], Abs[x - y], Abs[y - w]], s = s + 1], {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];
    m = Map[t[#] &, Range[0, 60]]
    (* or *)
    LinearRecurrence[{1, 1, 0, -1, -1, 1}, {1, 4, 9, 16, 27, 38}, 60]
    CoefficientList[Series[(1+3x+4x^2+3x^3+3x^4)/(1-x-x^2+x^4+x^5-x^6),{x,0,50}],x] (* Harvey P. Dale, Aug 11 2021 *)

Formula

a(n) = a(n-1) + a(n-2) - a(n-4) - a(n-5) + a(n-6).
G.f.: (1 + 3*x + 4*x^2 + 3*x^3 + 3*x^4)/(1 - x - x^2 + x^4 + x^5 - x^6).
a(n) = (n+1)^3 - A213492(n).