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+x)*(x^8+6*x^7+13*x^6+40*x^5+18*x^4+40*x^3+13*x^2+6*x+1) / ( (1+x+x^2)^3*(1-x)^4 ).
MATHEMATICA
t = Compile[{{n, _Integer}}, Module[{s = 0},
(Do[If[w == Max[w, x, y, z] - 2 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, 40]] (* A212745 *)
LinearRecurrence[{1, 0, 3, -3, 0, -3, 3, 0, 1, -1}, {1, 8, 27, 83, 162, 277, 495, 730, 1025, 1513}, 40]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, May 26 2012
STATUS
approved