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!)
 A212579 Number of (w,x,y,z) with all terms in {1,...,n} and min{|w-x|,|w-y|}=min{|x-y|,|x-z|}. 2
 0, 1, 8, 31, 80, 171, 308, 509, 780, 1137, 1584, 2143, 2812, 3615, 4552, 5645, 6892, 8321, 9924, 11731, 13736, 15967, 18416, 21117, 24056, 27269, 30744, 34515, 38568, 42943, 47620, 52641, 57988, 63701, 69760, 76211, 83028, 90259, 97880 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS For a guide to related sequences, see A211795. LINKS Index entries for linear recurrences with constant coefficients, signature (1, 2, -1, -2, -1, 2, 1, -1). FORMULA a(n) = a(n-1)+2*a(n-2)-a(n-3)-2*a(n-4)-a(n-5)+2*a(n-6)+a(n-7)-a(n-8). G.f.: (x + 7*x^2 + 21*x^3 + 34*x^4 + 39*x^5 + 25*x^6 + 7*x^7)/(1 - x - 2* x^2 + x^3 + 2*x^4 + x^5 - 2*x^6 - x^7 + x^8). MATHEMATICA t = Compile[{{n, _Integer}}, Module[{s = 0}, (Do[If[Min[Abs[w - x], Abs[w - y]] == Min[Abs[x - y], Abs[x - z]], s = s + 1], {w, 1, #}, {x, 1, #}, {y, 1, #}, {z, 1, #}] &[n]; s)]]; Map[t[#] &, Range[0, 40]]   (* A212579 *) LinearRecurrence[{1, 2, -1, -2, -1, 2, 1, -1}, {0, 1, 8, 31, 80, 171, 308, 509}, 50] CROSSREFS Cf. A211795. Sequence in context: A061294 A240707 A115293 * A115004 A303522 A299261 Adjacent sequences:  A212576 A212577 A212578 * A212580 A212581 A212582 KEYWORD nonn,easy AUTHOR Clark Kimberling, May 22 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 March 29 18:26 EDT 2020. Contains 333116 sequences. (Running on oeis4.)