A212981 Number of (w,x,y) with all terms in {0,...,n} and w <= x + y and x < y.
0, 2, 8, 21, 43, 77, 125, 190, 274, 380, 510, 667, 853, 1071, 1323, 1612, 1940, 2310, 2724, 3185, 3695, 4257, 4873, 5546, 6278, 7072, 7930, 8855, 9849, 10915, 12055, 13272, 14568, 15946, 17408, 18957, 20595, 22325, 24149, 26070, 28090
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (3,-2,-2,3,-1).
Crossrefs
Cf. A212959.
Programs
-
Mathematica
t = Compile[{{n, _Integer}}, Module[{s = 0}, (Do[If[w <= x + y && x < y, s = s + 1], {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]]; m = Map[t[#] &, Range[0, 60]] (* A212981 *) LinearRecurrence[{3,-2,-2,3,-1},{0,2,8,21,43},50] (* Harvey P. Dale, Jul 31 2013 *)
Formula
a(n) = 3*a(n-1)-2*a(n-2)-2*a(n-3)+3*a(n-4)-a(n-5).
G.f.: f(x)/g(x), where f(x)=2*x + 2*x^2 + x^3 and g(x)=(1+x)*(1-x)^4.
a(n) = (20*n^3+42*n^2+28*n+3*(1-(-1)^n))/48. - Luce ETIENNE, Feb 17 2015
Comments