OFFSET
0,2
COMMENTS
For a guide to related sequences, see A211795.
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,3,-3,0,-3,3,0,1,-1).
FORMULA
a(n)=a(n-1)+3*a(n-3)-3*a(n-4)-3*a(n-6)+3*a(n-7)+a(n-9)-a(n-10).
G.f.: ( 1+7*x+12*x^2+34*x^3+40*x^4+18*x^5+19*x^6+7*x^7 ) / ( (1+x+x^2)^3*(1-x)^4 ).
MATHEMATICA
t = Compile[{{n, _Integer}}, Module[{s = 0},
(Do[If[w == Floor[(Max[w, x, y, z] - Min[w, x, y, z])/2], s = s + 1],
{w, 0, n}, {x, 0, n}, {y, 0, n}, {z, 0, n}]; s)]];
Map[t[#] &, Range[0, 45]] (* A212758 *)
LinearRecurrence[{1, 0, 3, -3, 0, -3, 3, 0, 1, -1}, {1, 8, 20, 57, 118, 172, 299, 468, 594, 865}, 45]
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, May 28 2012
STATUS
approved