Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #10 Jun 13 2015 00:54:14
%S 1,10,37,96,205,386,665,1072,1641,2410,3421,4720,6357,8386,10865,
%T 13856,17425,21642,26581,32320,38941,46530,55177,64976,76025,88426,
%U 102285,117712,134821,153730,174561,197440,222497,249866,279685
%N Number of (w,x,y,z) with all terms in {0,...,n} and |w-x|=max{w,x,y,z}-min{w,x,y,z}.
%C For a guide to related sequences, see A211795.
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (5,-10,10,-5,1).
%F a(n)=5*a(n-1)-10*a(n-2)+10*a(n-3)-5*a(n-4)+a(n-5).
%F G.f.: ( -1-5*x+3*x^2-x^3 ) / (x-1)^5 .
%t t = Compile[{{n, _Integer}}, Module[{s = 0},
%t (Do[If[Abs[w - x] == Max[w, x, y, z] - Min[w, x, y, z], s = s + 1],
%t {w, 0, n}, {x, 0, n}, {y, 0, n}, {z, 0, n}]; s)]];
%t Map[t[#] &, Range[0, 40]] (* A212755 *)
%Y Cf. A211795.
%K nonn,easy
%O 0,2
%A _Clark Kimberling_, May 28 2012