This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 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

%I

%S 0,1,2,31,96,321,690,1471,2576,4465,6930,10671,15312,21841,29666,

%T 40111,52320,68001,85986,108415,133760,164641,199122,240351,285936,

%U 339601,398450,466831,541296,626865,719490,824911,938432,1066561

%N 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.

%C For a guide to related sequences, see A211795.

%H Todd Silvestri, <a href="/A212569/b212569.txt">Table of n, a(n) for n = 0..10000</a>

%F a(n) = n^4 - A212746(n).

%F 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).

%F 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.

%F a(n) = ((n-1)*n*(2*n*(2*n-5)-3*(-1)^n+11)-2*(-1)^n+2)/4. - _Todd Silvestri_, Nov 16 2014

%t 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 *)

%t 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 *)

%t 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 *)

%o (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

%o (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

%Y Cf. A211795.

%K nonn,easy

%O 0,3

%A _Clark Kimberling_, May 29 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified March 19 11:29 EDT 2019. Contains 321329 sequences. (Running on oeis4.)