login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A212570 Number of (w,x,y,z) with all terms in {1,...,n} and |w-x|=|x-y|+|y-z|. 7
0, 1, 6, 23, 52, 105, 178, 287, 424, 609, 830, 1111, 1436, 1833, 2282, 2815, 3408, 4097, 4854, 5719, 6660, 7721, 8866, 10143, 11512, 13025, 14638, 16407, 18284, 20329, 22490, 24831, 27296, 29953, 32742, 35735, 38868, 42217, 45714, 49439 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

For a guide to related sequences, see A211795.

Apart from the first term, partial sums of A220082. [Bruno Berselli, Dec 05 2012]

LINKS

Table of n, a(n) for n=0..39.

Index entries for linear recurrences with constant coefficients, signature (2,1,-4,1,2,-1).

FORMULA

a(n) = 2a(n-1)+a(n-2)-4a(n-3)+a(n-4)+2a(n-5)-a(n-6).

a(n) = n*(-1-3*(-1)^n+10*n^2)/12. G.f.: x*(x^4+4*x^3+10*x^2+4*x+1)/((x-1)^4*(x+1)^2). [Colin Barker, Oct 04 2012]

MATHEMATICA

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

(Do[If[Abs[w - x] == Abs[x - y] + Abs[y - z], s = s + 1],

{w, 1, #}, {x, 1, #}, {y, 1, #}, {z, 1, #}] &[n]; s)]];

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

CROSSREFS

Cf. A211795.

Sequence in context: A235332 A026817 A022269 * A272840 A272941 A272922

Adjacent sequences:  A212567 A212568 A212569 * A212571 A212572 A212573

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 16 09:23 EST 2019. Contains 320161 sequences. (Running on oeis4.)