OFFSET
0,3
COMMENTS
For a guide to related sequences, see A211795.
LINKS
Todd Silvestri, Table of n, a(n) for n = 0..10000
FORMULA
a(n) = n^4 - A212746(n).
a(n) = 2*a(n-1)+2*a(n-2)-6*a(n-3)+6*a(n-5)-2*a(n-6)-2*a(n-7)+a(n-8).
G.f.: f(x)/g(x), where f(x)=-x-25*x^3-36*x^4-79*x^5-36*x^6-15*x^7 and g(x)=((-1+x)^5)*(1+x)^3.
a(n) = ((n-1)*n*(2*n*(2*n-5)-3*(-1)^n+11)-2*(-1)^n+2)/4. - Todd Silvestri, Nov 16 2014
MATHEMATICA
t = Compile[{{n, _Integer}}, Module[{s = 0}, (Do[If[(w != # && x != # && y != # && z != #) &[Max[w, x, y, z] - Min[w, x, y, z]], s++], {w, 0, n}, {x, 0, n}, {y, 0, n}, {z, 0, n}]; s)]]; Map[t[#] &, Range[0, 40]] (* Peter J. C. Moses, May 24 2012 *)
a[n_Integer/; n>=0]:=((n-1) n (2 n (2 n-5)-3 (-1)^n+11)-2 (-1)^n+2)/4 (* Todd Silvestri, Nov 16 2014 *)
CoefficientList[Series[(- x - 25 x^3 - 36 x^4 - 79 x^5 - 36 x^6 - 15 x^7) / ((-1 + x)^5 (1 + x)^3), {x, 0, 40}], x] (* Vincenzo Librandi, Nov 16 2014 *)
PROG
(PARI) Vec((-x-25*x^3-36*x^4-79*x^5-36*x^6-15*x^7)/(((-1+x)^5)*(1+x)^3)+ O(x^50)) \\ Michel Marcus, Nov 16 2014
(Magma) [((n-1)*n*(2*n*(2*n-5)-3*(-1)^n+11)-2*(-1)^n+2)/4: n in [0..40]]; // Vincenzo Librandi, Nov 16 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, May 29 2012
STATUS
approved