%I #16 Feb 19 2024 10:29:52
%S 1,4,10,17,29,40,57,73,95,115,143,167,200,229,267,300,344,381,430,472,
%T 526,572,632,682,747,802,872,931,1007,1070,1151,1219,1305,1377,1469,
%U 1545,1642,1723,1825,1910,2018,2107,2220,2314,2432,2530,2654
%N Number of (w,x,y) with all terms in {0,...,n} and w = min(|w-x|, |x-y|).
%C For a guide to related sequences, see A212959.
%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (0,2,1,-1,-2,0,1).
%F a(n) = 2*a(n-2) + a(n-3) - a(n-4) - 2*a(n-5) + a(n-7).
%F G.f.: (1 + 4*x + 8*x^2 + 8*x^3 + 6*x^4 + 2*x^5)/((1 - x)^3 (1 + x)^2 (1 + x + x^2)).
%F a(n) = (n+1)^3 - A213499(n).
%t t = Compile[{{n, _Integer}}, Module[{s = 0},
%t (Do[If[w == Min[Abs[w - x], Abs[x - y]], s = s + 1],
%t {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];
%t m = Map[t[#] &, Range[0, 60]]
%Y Cf. A212959, A213499.
%K nonn,easy
%O 0,2
%A _Clark Kimberling_, Jun 14 2012