The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A213388 Number of (w,x,y) with all terms in {0,...,n} and 2|w-x| >= max(w,x,y)-min(w,x,y). 2

%I #13 Jan 28 2016 07:52:17

%S 1,6,21,48,93,158,249,368,521,710,941,1216,1541,1918,2353,2848,3409,

%T 4038,4741,5520,6381,7326,8361,9488,10713,12038,13469,15008,16661,

%U 18430,20321,22336,24481,26758,29173,31728,34429,37278,40281,43440,46761,50246,53901

%N Number of (w,x,y) with all terms in {0,...,n} and 2|w-x| >= max(w,x,y)-min(w,x,y).

%C a(n)+A171218(n) = (n+1)^3.

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

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

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

%F a(n) = 3*a(n-1)-2*a(n-2)-2*a(n-3)+3*a(n-4)-a(n-5).

%F G.f.: ((1 + 3*x + 5*x^2 + x^3)/((1 - x)^4*(1 + x))).

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

%F a(n) = (8*n^3+30*n^2+28*n+3*((-1)^n+3))/12.

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

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

%F (End)

%t t = Compile[{{n, _Integer}}, Module[{s = 0},

%t (Do[If[Max[w, x, y] - Min[w, x, y] <= 2 Abs[w - x], s = s + 1], {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];

%t m = Map[t[#] &, Range[0, 45]] (* A213388 *)

%o (PARI) Vec((1+3*x+5*x^2-x^3)/((1-x)^4*(1+x)) + O(x^100)) \\ _Colin Barker_, Jan 28 2016

%Y Cf. A212959.

%K nonn,easy

%O 0,2

%A _Clark Kimberling_, Jun 11 2012

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 21 08:56 EDT 2024. Contains 372733 sequences. (Running on oeis4.)