|
|
A151307
|
|
Number of walks within N^2 (the first quadrant of Z^2) starting at (0,0) and consisting of n steps taken from {(-1, 0), (0, -1), (0, 1), (1, -1), (1, 1)}
|
|
1
|
|
|
1, 2, 9, 34, 151, 659, 2999, 13714, 63799, 298397, 1408415, 6678827, 31841195, 152374091, 731802083, 3524706626, 17021524103, 82383673241, 399539775647, 1941095088373, 9445526397891, 46028331970139, 224587864915595, 1097124938773915, 5365254892362091, 26263285466953979, 128675997398671299
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
LINKS
|
|
|
FORMULA
|
G.f.: Int(-1+Int(x*(26+Int(2*(5*x-1)*(1-2*x-15*x^2)^(1/2)*((12*x^2+4*x+1)*(240*x^5+88*x^4+64*x^3+25*x^2+2*x+1)*hypergeom([7/4,9/4],[2],64*x^3*(1+x)/(1-4*x^2)^2)-2*x^3*(360*x^4+128*x^3+89*x^2+52*x+1)*hypergeom([7/4,9/4],[3],64*x^3*(1+x)/(1-4*x^2)^2))/(x^2*(1-4*x^2)^(9/2)),x))/((1-2*x-15*x^2)^(3/2)*(5*x-1)),x),x)/(x*(x-1)). - Mark van Hoeij, Aug 16 2014
|
|
MAPLE
|
steps:= [[-1, 0], [0, -1], [0, 1], [1, -1], [1, 1]]:
f:= proc(n, p) option remember; local t;
if n <= min(p) then return 5^n fi;
add(procname(n-1, t), t=remove(has, map(`+`, steps, p), -1));
end proc:
|
|
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, 1 + j, -1 + n] + aux[i, -1 + j, -1 + n] + aux[i, 1 + j, -1 + n] + aux[1 + i, j, -1 + n]]; Table[Sum[aux[i, j, n], {i, 0, n}, {j, 0, n}], {n, 0, 25}]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,walk
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|