OFFSET
0,3
COMMENTS
For a guide to related sequences, see A211795.
LINKS
Index entries for linear recurrences with constant coefficients, signature (-1,1,4,3,-3,-6,-3,3,4,1,-1,-1)
FORMULA
a(n)=-a(n-1)+a(n-2)+4*a(n-3)+3*a(n-4)-3*a(n-5)-6*a(n-6)-3*a(n-7)+3*a(n-8)+4*a(n-9)+a(n-10)-a(n-11)-a(n-12).
G.f.: ( 1+2*x+13*x^2+40*x^3+68*x^4+52*x^5+43*x^6+38*x^7+19*x^8 ) / ( (1+x)^2*(1+x+x^2)^3*(x-1)^4 ).
MATHEMATICA
t = Compile[{{n, _Integer}}, Module[{s = 0},
(Do[If[2 w == Max[w, x, y, z] - Min[w, x, y, z], s = s + 1], {w, 0, n}, {x, 0, n}, {y, 0, n}, {z, 0, n}]; s)]];
Map[t[#] &, Range[0, 45]] (* A212757 *)
LinearRecurrence[{-1, 1, 4, 3, -3, -6, -3, 3, 4, 1, -1, -1}, {1, 1, 13, 32, 56, 80, 177, 213, 297, 472, 580, 688}, 45]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, May 28 2012
STATUS
approved