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!)
A127618 Number of walks from (0,0) to (n,n) in the region 0 <= x-y <= 4 with the steps (1,0), (0, 1), (2,0) and (0,2). 3

%I #20 Apr 03 2019 08:01:08

%S 1,1,5,22,117,590,3018,15378,78440,399992,2039852,10402480,53049048,

%T 270531368,1379614800,7035549312,35878823312,182969359520,

%U 933079279328,4758375627808,24266039468160,123748253080832,631072497876672

%N Number of walks from (0,0) to (n,n) in the region 0 <= x-y <= 4 with the steps (1,0), (0, 1), (2,0) and (0,2).

%H Arvind Ayyer and Doron Zeilberger, <a href="https://arxiv.org/abs/math/0610734">The Number of [Old-Time] Basketball games with Final Score n:n where the Home Team was never losing but also never ahead by more than w Points</a>, arXiv:math/0610734 [math.CO], 2006-2007.

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

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

%e a(2)=5 because we can reach (2,2) in the following ways:

%e (0,0),(1,0),(1,1),(2,1),(2,2)

%e (0,0),(2,0),(2,2)

%e (0,0),(1,0),(2,0),(2,2)

%e (0,0),(2,0),(2,1),(2,2)

%e (0,0),(1,0),(2,0),(2,1),(2,2)

%t Join[{1, 1}, LinearRecurrence[{4, 6, -2}, {5, 22, 117}, 21]] (* _Jean-François Alcover_, Dec 10 2018 *)

%t b[n_, k_] := Boole[n >= 0 && k >= 0 && 0 <= n-k <= 4];

%t T[0, 0] = T[1, 1] = 1; T[n_, k_] /; b[n, k] == 1 := T[n, k] = b[n-2, k]* T[n-2, k] + b[n-1, k]*T[n-1, k] + b[n, k-2]*T[n, k-2] + b[n, k-1]*T[n, k-1]; T[_, _] = 0;

%t a[n_] := T[n, n];

%t Table[a[n], {n, 0, 22}] (* _Jean-François Alcover_, Apr 03 2019 *)

%Y Cf. A000108, A046717, A122951, A127617, A127619, A127620.

%K nonn,easy,walk

%O 0,3

%A _Arvind Ayyer_, Jan 20 2007

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 March 28 22:04 EDT 2024. Contains 371254 sequences. (Running on oeis4.)