login
A190587
Number of two-sided n-step prudent walks ending on the northeast corner of their box, avoiding two or more consecutive west steps and south steps.
2
1, 2, 4, 10, 24, 56, 130, 304, 714, 1678, 3944, 9276, 21832, 51408, 121088, 285288, 672304, 1584638, 3735596, 8807312, 20766914, 48970942, 115487946, 272371376, 642404770, 1515218012, 3574025956, 8430514614, 19886678810, 46911630678, 110664280068, 261060908326
OFFSET
0,2
LINKS
Shanzhen Gao, Keh-Hsun Chen, Tackling Sequences From Prudent Self-Avoiding Walks, FCS'14, The 2014 International Conference on Foundations of Computer Science.
FORMULA
D-finite with recurrence (n+1)*a(n) -5*n*a(n-1) +(9*n-11)*a(n-2) +(-11*n+23)*a(n-3) +3*(4*n-9)*a(n-4) +2*(-2*n+1)*a(n-5) +(3*n-2)*a(n-6) +(-3*n+28)*a(n-7) +2*(-n+4)*a(n-8) +2*(-n+8)*a(n-9) +2*(n-10)*a(n-10)=0. - R. J. Mathar, May 30 2014
Recurrence (of order 9): (n-4)*(n+1)*a(n) = n*(4*n - 15)*a(n-1) - (5*n^2 - 24*n + 25)*a(n-2) + (6*n^2 - 33*n + 38)*a(n-3) - (6*n^2 - 30*n + 31)*a(n-4) - (2*n^2 - 24*n + 59)*a(n-5) - (5*n^2 - 42*n + 93)*a(n-6) - 2*(n^2 - 6*n + 14)*a(n-7) - 10*a(n-8) + 2*(n-9)*(n-3)*a(n-9). - Vaclav Kotesovec, Sep 03 2014
G.f.: ((1-x)*sqrt((1-x-x^3)^2 - 4*x^4) - 1 + 3*x-x^2+x^3 + x^4)/(x*(1-2*x-2*x^3)), see sequence 12 in link. - Michel Marcus, May 06 2015
MAPLE
b:= proc(d, i, n, x, y) option remember;
`if`(n=0, `if`(x=0 and y=0, 1, 0),
`if`(d<>3, b(1, x=0, n-1, max(x-1, 0), y), 0) +
`if`(d<>4, b(2, y=0, n-1, x, max(y-1, 0)), 0) +
`if`(d=0 or d=2 and i, b(3, false, n-1, x+1, y), 0) +
`if`(d=0 or d=1 and i, b(4, false, n-1, x, y+1), 0))
end:
a:= n-> b(0, false, n, 0, 0):
seq(a(n), n=0..30); # Alois P. Heinz, Jun 09 2011
MATHEMATICA
CoefficientList[Series[((1 - x) Sqrt[(1 - x - x^3)^2 - 4 x^4] - 1 + 3 x - x^2 + x^3 + x^4)/(x (1 - 2 x - 2 x^3)), {x, 0, 50}], x] (* Vincenzo Librandi, May 07 2015 *)
CROSSREFS
Sequence in context: A095214 A002525 A159328 * A190794 A052912 A024740
KEYWORD
nonn,walk
AUTHOR
Shanzhen Gao, May 13 2011
EXTENSIONS
More terms from Alois P. Heinz, Jun 09 2011
STATUS
approved