[go: up one dir, main page]

login
A212569 revision #18

A212569
Number of (w,x,y,z) with all terms in {0,...,n} such that range{w,x,y,z} is not one of the numbers w,x,y,z.
3
0, 1, 2, 31, 96, 321, 690, 1471, 2576, 4465, 6930, 10671, 15312, 21841, 29666, 40111, 52320, 68001, 85986, 108415, 133760, 164641, 199122, 240351, 285936, 339601, 398450, 466831, 541296, 626865, 719490, 824911, 938432, 1066561
OFFSET
0,3
COMMENTS
For a guide to related sequences, see A211795.
LINKS
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
Cf. A211795.
Sequence in context: A282725 A030459 A141978 * A101254 A243472 A336788
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, May 29 2012
STATUS
proposed