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!)
A212686 Number of (w,x,y,z) with all terms in {1,...,n} and 2|w-x|=n+|y-z|. 2

%I #10 Jun 13 2015 00:54:14

%S 0,0,4,8,24,40,76,112,176,240,340,440,584,728,924,1120,1376,1632,1956,

%T 2280,2680,3080,3564,4048,4624,5200,5876,6552,7336,8120,9020,9920,

%U 10944,11968,13124,14280,15576,16872,18316,19760,21360,22960

%N Number of (w,x,y,z) with all terms in {1,...,n} and 2|w-x|=n+|y-z|.

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

%C For a guide to related sequences, see A211795.

%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (2, 1, -4, 1, 2, -1).

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

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

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

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

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

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

%t %/4 (* A005993 *)

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

%Y Cf. A211795.

%K nonn,easy

%O 0,3

%A _Clark Kimberling_, May 25 2012

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 24 00:30 EDT 2024. Contains 371917 sequences. (Running on oeis4.)