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.

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

Original entry on oeis.org

0, 1, 4, 13, 29, 56, 95, 150, 222, 315, 430, 571, 739, 938, 1169, 1436, 1740, 2085, 2472, 2905, 3385, 3916, 4499, 5138, 5834, 6591, 7410, 8295, 9247, 10270, 11365, 12536, 13784, 15113, 16524, 18021, 19605, 21280, 23047, 24910, 26870, 28931
Offset: 0

Views

Author

Clark Kimberling, May 09 2012

Keywords

Comments

For a guide to related sequences, see A211795.

Crossrefs

Cf. A211795.

Programs

  • Mathematica
    t = Compile[{{n, _Integer}}, Module[{s = 0},
    (Do[If[2 w == x + y + z - n, s = s + 1],
    {w, 1, #}, {x, 1, #}, {y, 1, #}, {z, 1, #}] &[n]; s)]];
    Map[t[#] &, Range[0, 60]]  (* A212246 *)
    FindLinearRecurrence[%]
    (* Peter J. C. Moses, Apr 13 2012 *)
    LinearRecurrence[{3, -2, -2, 3, -1},{0, 1, 4, 13, 29},42] (* Ray Chandler, Aug 02 2015 *)
    CoefficientList[Series[x (1+x+3x^2)/((1+x)(1-x)^4),{x,0,50}],x] (* Harvey P. Dale, Jul 06 2021 *)

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*(1+x+3*x^2)/((1+x)*(1-x)^4). [Bruno Berselli, May 30 2012]
a(n) = (2*n*(10*n^2+3*n+2)-9(-1)^n+9)/48. [Bruno Berselli, May 30 2012]