The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A212746 Number of (w,x,y,z) with all terms in {0,...,n} and at least one of them is the range of {w,x,y,z}. 3

%I

%S 1,15,79,225,529,975,1711,2625,3985,5535,7711,10065,13249,16575,20959,

%T 25425,31201,36975,44335,51585,60721,69615,80719,91425,104689,117375,

%U 132991,147825,165985,183135,204031,223665,247489,269775,296719,321825,352081,380175

%N Number of (w,x,y,z) with all terms in {0,...,n} and at least one of them is the range of {w,x,y,z}.

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

%H Colin Barker, <a href="/A212746/b212746.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (1,3,-3,-3,3,1,-1).

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

%F a(n) = a(n-1)+3*a(n-2)-3*a(n-3)-3*a(n-5)+3*a(n-6)+a(n-7)-a(n-8).

%F G.f.: (1+14*x+61*x^2+104*x^3+115*x^4+50*x^5+15*x^6) / ((1+x)^3*(x-1)^4).

%F From _Colin Barker_, Jan 29 2016: (Start)

%F a(n) = (3*n*(10*n^2+n+(-1)^n*(n-1)+9)+2*((-1)^n+1))/4.

%F a(n) = (15*n^3+3*n^2+12*n+2)/2 for n even.

%F a(n) = (15*n^3+15*n)/2 for n odd.

%F (End)

%e For n=1, there are sixteen 4-tuples, (w,x,y,z); All but two include both 0 and 1 and have range 1. The two others, (0,0,0,0) and (1,1,1,1,), have range 0. Therefore, a(1)=15.

%t Remove["Global`*"];

%t t = Compile[{{n, _Integer}},

%t Module[{s = 0}, (Do[

%t If[(w == # || x == # || y == # || z == #) &[

%t Max[w, x, y, z] - Min[w, x, y, z]], s++], {w, 0, n},

%t {x, 0, n}, {y, 0, n}, {z, 0, n}]; s)]];

%t Map[t[#] &, Range[0, 40]] (* A212746 *)

%t (* _Peter J. C. Moses_, May 24 2012 *)

%t LinearRecurrence[{1,3,-3,-3,3,1,-1},{1,15,79,225,529,975,1711},40] (* _Harvey P. Dale_, Oct 24 2018 *)

%o (PARI) Vec((1+14*x+61*x^2+104*x^3+115*x^4+50*x^5+15*x^6)/((1+x)^3*(x-1)^4) + O(x^100)) \\ _Colin Barker_, Jan 29 2016

%Y Cf. A211795, A212744.

%K nonn,easy

%O 0,2

%A _Clark Kimberling_, May 27 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 April 23 01:30 EDT 2021. Contains 343198 sequences. (Running on oeis4.)