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.

A212251 Number of (w,x,y,z) with all terms in {1,...,n} and 3w = x + y + z + n + 1.

Original entry on oeis.org

0, 0, 1, 6, 15, 30, 54, 87, 131, 189, 261, 349, 456, 582, 729, 900, 1095, 1316, 1566, 1845, 2155, 2499, 2877, 3291, 3744, 4236, 4769, 5346, 5967, 6634, 7350, 8115, 8931, 9801, 10725, 11705, 12744, 13842, 15001, 16224, 17511, 18864, 20286, 21777, 23339, 24975
Offset: 0

Views

Author

Clark Kimberling, May 15 2012

Keywords

Comments

Also, the number of (w,x,y,z) with all terms in {1,...,n} and 3w = x + y + z - n - 1.
For a guide to related sequences, see A211795.

Crossrefs

Cf. A211795.

Programs

  • Mathematica
    t = Compile[{{n, _Integer}}, Module[{s = 0},
    (Do[If[3 w == x + y + z + n + 1, s = s + 1],
    {w, 1, #}, {x, 1, #}, {y, 1, #}, {z, 1, #}] &[n]; s)]];
    Map[t[#] &, Range[0, 40]]  (* A212251 *)
    (* Peter J. C. Moses, Apr 13 2012 *)
  • PARI
    concat(vector(2), Vec(x^2*(1 + 3*x + x^3) / ((1 - x)^4*(1 + x + x^2)) + O(x^40))) \\ Colin Barker, Dec 02 2017

Formula

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.: x^2*(1 + 3*x + x^3) / ((1 - x)^4*(1 + x + x^2)). - Colin Barker, Dec 02 2017