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
1, 6, 21, 48, 93, 158, 249, 368, 521, 710, 941, 1216, 1541, 1918, 2353, 2848, 3409, 4038, 4741, 5520, 6381, 7326, 8361, 9488, 10713, 12038, 13469, 15008, 16661, 18430, 20321, 22336, 24481, 26758, 29173, 31728, 34429, 37278, 40281, 43440, 46761, 50246, 53901 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
a(n)+A171218(n) = (n+1)^3.
For a guide to related sequences, see A212959.
LINKS
FORMULA
a(n) = 3*a(n-1)-2*a(n-2)-2*a(n-3)+3*a(n-4)-a(n-5).
G.f.: ((1 + 3*x + 5*x^2 + x^3)/((1 - x)^4*(1 + x))).
From Colin Barker, Jan 28 2016: (Start)
a(n) = (8*n^3+30*n^2+28*n+3*((-1)^n+3))/12.
a(n) = (4*n^3+15*n^2+14*n+6)/6 for n even.
a(n) = (4*n^3+15*n^2+14*n+3)/6 for n odd.
(End)
MATHEMATICA
t = Compile[{{n, _Integer}}, Module[{s = 0},
(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)]];
m = Map[t[#] &, Range[0, 45]] (* A213388 *)
PROG
(PARI) Vec((1+3*x+5*x^2-x^3)/((1-x)^4*(1+x)) + O(x^100)) \\ Colin Barker, Jan 28 2016
CROSSREFS
Cf. A212959.
Sequence in context: A051941 A212707 A267370 * A163715 A028345 A357691
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jun 11 2012
STATUS
approved

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 April 30 15:01 EDT 2024. Contains 372134 sequences. (Running on oeis4.)