|
|
A212252
|
|
Number of (w,x,y,z) with all terms in {1,...,n} and 3w=x+y+z+n+2.
|
|
2
|
|
|
0, 0, 0, 3, 11, 24, 45, 76, 117, 171, 240, 324, 426, 548, 690, 855, 1045, 1260, 1503, 1776, 2079, 2415, 2786, 3192, 3636, 4120, 4644, 5211, 5823, 6480, 7185, 7940, 8745, 9603, 10516, 11484, 12510, 13596, 14742, 15951, 17225, 18564, 19971
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
COMMENTS
|
Also, the number of (w,x,y,z) with all terms in {1,...,n} and 3w=x+y+z-n-2.
For a guide to related sequences, see A211795.
|
|
LINKS
|
|
|
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).
a(n)=2/9-n/2-n^2/3+5*n^3/18-2/9*cos(2*n*Pi/3)+4*sin(2*n*Pi/3)/(9*sqrt(3)).
G.f.: x^3*(3+2*x)/((x-1)^4*(1+x+x^2)).
(End)
|
|
MATHEMATICA
|
t = Compile[{{n, _Integer}}, Module[{s = 0},
(Do[If[3 w == x + y + z + n + 2, s = s + 1],
{w, 1, #}, {x, 1, #}, {y, 1, #}, {z, 1, #}] &[n]; s)]];
Map[t[#] &, Range[0, 40]] (* A212252 *)
Table[2/9-n/2-n^2/3+5n^3/18-2/9Cos[2 n Pi/3] + 4Sin[2 n Pi/3]/9/Sqrt[3], {n, 0, 20}] (* Benedict W. J. Irwin, Sep 05 2016 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|