A212901 Number of (w,x,y,z) with all terms in {0,...,n} and equal consecutive gap sizes.
1, 4, 13, 26, 45, 66, 95, 126, 163, 204, 251, 300, 357, 416, 481, 550, 625, 702, 787, 874, 967, 1064, 1167, 1272, 1385, 1500, 1621, 1746, 1877, 2010, 2151, 2294, 2443, 2596, 2755, 2916, 3085, 3256, 3433, 3614, 3801, 3990, 4187, 4386, 4591
Offset: 0
Examples
a(1)=4 counts these (w,x,y,z): (0,0,0,0), (1,1,1,1), (0,1,0,1), (1,0,1,0).
Links
- Index entries for linear recurrences with constant coefficients, signature (1,1,0,-1,-1,1).
Programs
-
Mathematica
t = Compile[{{n, _Integer}}, Module[{s = 0}, (Do[If[Abs[w - x] == Abs[x - y] == Abs[y - z], s = s + 1], {w, 0, n}, {x, 0, n}, {y, 0, n}, {z, 0, n}]; s)]]; m = Map[t[#] &, Range[0, 40]] (* A212901 *)
Formula
a(n) = a(n-1)+a(n-2)-a(n-4)-a(n-5)+a(n-6).
G.f.: f(x)/g(x), where f(x) = 1 + 3*x + 8*x^2 + 9*x^3 + 7*x^4 and g(x) = (1 + 2*x + 2*x^2 + x^3)(1 - x)^3.
Comments