A212975 Number of (w,x,y) with all terms in {0,...,n} and even range.
1, 2, 15, 28, 65, 102, 175, 248, 369, 490, 671, 852, 1105, 1358, 1695, 2032, 2465, 2898, 3439, 3980, 4641, 5302, 6095, 6888, 7825, 8762, 9855, 10948, 12209, 13470, 14911, 16352, 17985, 19618, 21455, 23292, 25345, 27398, 29679, 31960
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (2,1,-4,1,2,-1).
Programs
-
Mathematica
t = Compile[{{n, _Integer}}, Module[{s = 0}, (Do[If[Mod[Max[w, x, y] - Min[w, x, y], 2] == 0, s = s + 1], {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]]; m = Map[t[#] &, Range[0, 60]] (* A212975 *)
Formula
a(n) = (n+1)*(2*n*(n+2)+3*(-1)^n+1)/4.
a(n) = 2*a(n-1)+a(n-2)-4*a(n-3)+a(n-4)+2*a(n-5)-a(n-6).
G.f.: f(x)/g(x), where f(x) = 1 + 10*x^2 + x^4 and g(x) = ((1-x)^4)*(1+x)^2.
Comments