This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A212684 Number of (w,x,y,z) with all terms in {1,...,n} and  |x-y|=n-w+|y-z|. 3
 0, 1, 6, 19, 42, 79, 132, 205, 300, 421, 570, 751, 966, 1219, 1512, 1849, 2232, 2665, 3150, 3691, 4290, 4951, 5676, 6469, 7332, 8269, 9282, 10375, 11550, 12811, 14160, 15601, 17136, 18769, 20502, 22339, 24282, 26335, 28500, 30781, 33180 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS For a guide to related sequences, see A211795. Also the number of (w,x,y) with all terms in {0,...,n-1} and |w-x|>=|x-y|, see A212959. Clark Kimberling, Jun 02 2012 LINKS Index entries for linear recurrences with constant coefficients, signature (3,-2,-2,3,-1). FORMULA a(n) = 3*a(n-1)-2*a(n-2)-2*a(n-3)+3*a(n-4)-a(n-5). a(n) + A212683(n) = n^3. Clark Kimberling, Jun 02 2012 G.f.: x*(1+3*x+3*x^2-x^3)/((1+x)*(1-x)^4). [Bruno Berselli, Jun 07 2012] a(n) = (2*n*(n+2)*(2*n-1)-(-1)^n+1)/8. [Bruno Berselli, Jun 07 2012] MATHEMATICA t = Compile[{{n, _Integer}}, Module[{s = 0}, (Do[If[Abs[x - y] == n - w + Abs[y - z], s = s + 1], {w, 1, #}, {x, 1, #}, {y, 1, #}, {z, 1, #}] &[n]; s)]]; Map[t[#] &, Range[0, 40]]   (* A212684 *) LinearRecurrence[{3, -2, -2, 3, -1}, {0, 1, 6, 19, 42}, 41] (* Bruno Berselli, Jun 07 2012 *) PROG (Maxima) makelist(coeff(taylor(x*(1+3*x+3*x^2-x^3)/((1+x)*(1-x)^4), x, 0, n), x, n), n, 0, 40); [Bruno Berselli, May 07 2012] CROSSREFS Cf. A211795. Sequence in context: A273778 A173980 A299281 * A035495 A061293 A005900 Adjacent sequences:  A212681 A212682 A212683 * A212685 A212686 A212687 KEYWORD nonn,easy AUTHOR Clark Kimberling, May 24 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified January 22 20:23 EST 2019. Contains 319365 sequences. (Running on oeis4.)