login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A212686 Number of (w,x,y,z) with all terms in {1,...,n} and 2|w-x|=n+|y-z|. 2
0, 0, 4, 8, 24, 40, 76, 112, 176, 240, 340, 440, 584, 728, 924, 1120, 1376, 1632, 1956, 2280, 2680, 3080, 3564, 4048, 4624, 5200, 5876, 6552, 7336, 8120, 9020, 9920, 10944, 11968, 13124, 14280, 15576, 16872, 18316, 19760, 21360, 22960 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

a(n)=4*A005993(n-2) for n>=2.

For a guide to related sequences, see A211795.

LINKS

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

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

FORMULA

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

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

MATHEMATICA

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

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

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

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

%/4  (* A005993 *)

LinearRecurrence[{2, 1, -4, 1, 2, -1}, {0, 0, 4, 8, 24, 40}, 40]

CROSSREFS

Cf. A211795.

Sequence in context: A024589 A062015 A006640 * A316961 A180002 A266821

Adjacent sequences:  A212683 A212684 A212685 * A212687 A212688 A212689

KEYWORD

nonn,easy

AUTHOR

Clark Kimberling, May 25 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 August 7 22:44 EDT 2020. Contains 336279 sequences. (Running on oeis4.)