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!)
A172361 Number of walks within N^2 (the first quadrant of Z^2) starting and ending at (0,0), and consisting of n steps taken from {(-1, -1), (-1, 0), (-1, 1), (0, -1), (0, 1), (1, -1), (1, 0), (1, 1)}. 1
1, 0, 3, 6, 38, 160, 905, 4830, 28308, 166992, 1024758, 6389460, 40724244, 263385408, 1728855843, 11484066594, 77130790880, 523010474272, 3577392455780, 24659960867256, 171191809159176, 1196062991373120, 8405598880928158, 59390108287965884, 421702103951853232 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..1000

M. Bousquet-Mélou and M. Mishna, 2008. Walks with small steps in the quarter plane, ArXiv 0810.4387.

FORMULA

G.f.: (1-2*t)*Int(hypergeom([1/2, 1/2], [2], 16*t*(t+1)/(1+4*t)^2 /(1-2*t)^2, t)/t^2 - 1/t.  - Mark van Hoeij, Oct 31 2012

MAPLE

b:= proc(n, l) option remember; `if`(min(l[])<0 or n<max(l[]), 0,

      `if`(n=0, 1, add(b(n-1, l-d), d=[[-1, -1], [-1, 0], [-1, 1],

                        [0, -1], [0, 1], [1, -1], [1, 0], [1, 1]])))

    end:

a:= n-> b(n, [0$2]):

seq(a(n), n=0..30);  # Alois P. Heinz, Jul 22 2012

# second Maple program

a:= proc(n) option remember; `if`(n<4, [1, 0, 3, 6][n+1],

      ((n-1)*(n+1)*(9*n^2+9*n+4) *a(n-1)

      +4*(3*n-2)*(n-1)*(9*n^2+5*n-1) *a(n-2)

      +32*n*(n-1)*(n-2)*(3*n+2) *a(n-3))/ ((n+1)*(3*n-1)*(n+2)^2))

    end:

seq(a(n), n=0..30);  # Alois P. Heinz, Oct 31 2012

MATHEMATICA

aux[i_Integer, j_Integer, n_Integer] := Which[Min[i, j, n] < 0 || Max[i, j] > n, 0, n == 0, KroneckerDelta[i, j, n], True, aux[i, j, n] = aux[ -1 + i, -1 + j, -1 + n] + aux[ -1 + i, j, -1 + n] + aux[ -1 + i, 1 + j, -1 + n] + aux[i, -1 + j, -1 + n] + aux[i, 1 + j, -1 + n] + aux[1 + i, -1 + j, -1 + n] + aux[1 + i, j, -1 + n] + aux[1 + i, 1 + j, -1 + n]]; Table[aux[0, 0, n], {n, 0, 25}]

CROSSREFS

Cf. A025596.

Sequence in context: A093800 A068776 A025596 * A114038 A000222 A208649

Adjacent sequences:  A172358 A172359 A172360 * A172362 A172363 A172364

KEYWORD

nonn,easy

AUTHOR

Manuel Kauers, Feb 01 2010

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 April 8 08:54 EDT 2020. Contains 333313 sequences. (Running on oeis4.)