login
A212247
Number of (w,x,y,z) with all terms in {1,...,n} and 3w=x+y+z+n.
3
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,3
COMMENTS
For a guide to related sequences, see A211795.
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]
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 *)
CROSSREFS
Cf. A211795.
Sequence in context: A368570 A135039 A168559 * A213801 A301886 A015634
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, May 09 2012
STATUS
approved