A284414
Number T(n,k) of self-avoiding planar walks of length k starting at (0,0), ending at (n,0), remaining in the first quadrant and using steps (0,1), (1,0), (1,1), (-1,1), and (1,-1) with the restriction that (0,1) is never used below the diagonal and (1,0) is never used above the diagonal; triangle T(n,k), n>=0, n<=k<=n*(n+3)/2, read by rows.
Original entry on oeis.org
1, 1, 1, 2, 1, 1, 1, 4, 4, 4, 7, 3, 1, 1, 9, 8, 16, 21, 17, 15, 10, 9, 4, 1, 1, 21, 22, 54, 87, 87, 116, 99, 91, 78, 42, 31, 17, 10, 5, 1, 1, 51, 54, 178, 269, 370, 499, 536, 590, 560, 510, 420, 350, 268, 185, 132, 69, 44, 23, 11, 6, 1, 1
Offset: 0
Triangle T(n,k) begins:
1;
. 1, 1;
. . 2, 1, 1, 1;
. . . 4, 4, 4, 7, 3, 1, 1;
. . . . 9, 8, 16, 21, 17, 15, 10, 9, 4, 1, 1;
. . . . . 21, 22, 54, 87, 87, 116, 99, 91, 78, 42, 31, 17, 10, 5, 1, 1;
A284230
Number of self-avoiding planar walks starting at (0,0), ending at (n,0), remaining in the first quadrant and using steps (0,1), (1,0), (1,1), (-1,1), and (1,-1) with the restriction that (0,1) is never used below the diagonal and (1,0) is never used above the diagonal.
Original entry on oeis.org
1, 2, 5, 24, 111, 762, 5127, 45588, 400593, 4370634, 47311677, 611446464, 7857786015, 117346361778, 1745000283087, 29562853594284, 499180661754849, 9458257569095826, 178734707493557301, 3744942786114870888, 78294815164675006479, 1797384789345147560298
Offset: 0
a(0) = 1: [(0,0)].
a(1) = 2: [(0,0),(1,0)], [(0,0),(0,1),(1,0)].
a(2) = 5: [(0,0),(1,0),(2,0)], [(0,0),(0,1),(1,0),(2,0)], [(0,0),(1,1),(2,0)], [(0,0),(0,1),(0,2),(1,1),(2,0)], [(0,0),(1,0),(0,1),(0,2),(1,1),(2,0)].
Bisection (even part) gives
A284461.
-
a:= proc(n) option remember; `if`(n<2, n+1,
(n+irem(n, 2))*a(n-1)+(n-1)*a(n-2))
end:
seq(a(n), n=0..25);
-
a[n_]:=If[n<2, n + 1, (n + Mod[n,2]) * a[n - 1] + (n - 1) a[n - 2]]; Table[a[n], {n, 0, 25}] (* Indranil Ghosh, Mar 27 2017 *)
A285673
Total number of nodes summed over all self-avoiding planar walks starting at (0,0), ending at (n,n), remaining in the first quadrant and using steps (0,1), (1,0), (1,1), (-1,1), and (1,-1) with the restriction that (0,1) is never used below the diagonal and (1,0) is never used above the diagonal.
Original entry on oeis.org
1, 20, 907, 69928, 8190329, 1352590668, 299134112595, 85301875065360, 30466886170947633, 13319092946564641476, 6994728861780241970523, 4344874074153003071077560, 3150737511338249699332032297, 2637670112785000275509973725820, 2524664376417193478764383143006883
Offset: 0
-
b:= proc(x, y, t) option remember;
`if`(x<0 or y<0, 0,
`if`(x=0 and y=0, [1$2], (p-> p+[0, p[1]])(
`if`(x>y, b(x-1, y, 0), 0)+
`if`(y>x, b(x, y-1, 0), 0)+
b(x-1, y-1, 0)+
`if`(t<>2, b(x+1, y-1, 1), 0)+
`if`(t<>1, b(x-1, y+1, 2), 0))))
end:
a:= n-> b(n$2, 0)[2]:
seq(a(n), n=0..20);
-
b[x_, y_, t_] := b[x, y, t] = If[x < 0 || y < 0, 0, If[x == 0 && y == 0, {1, 1}, Function[p, p + {0, p[[1]]}][If[x > y, b[x - 1, y, 0], 0] + If[y > x, b[x, y - 1, 0], 0] + b[x - 1, y - 1, 0] + If[t != 2, b[x + 1, y - 1, 1], 0] + If[t != 1, b[x - 1, y + 1, 2], 0]]]];
a[n_] := b[n, n, 0][[2]];
Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Jun 19 2017, translated from Maple *)
A284652
Number T(n,k) of self-avoiding planar walks of length k starting at (0,0), ending at (n,0), remaining in the first quadrant and using steps (0,1), (1,0), (1,1), (-1,1), and (1,-1) with the restriction that (0,1) is never used below the diagonal and (1,0) is never used above the diagonal; triangle T(n,k), k>=0, floor((sqrt(1+8*k)-1)/2)<=n<=k, read by columns.
Original entry on oeis.org
1, 1, 1, 2, 1, 4, 1, 4, 9, 1, 4, 8, 21, 7, 16, 22, 51, 3, 21, 54, 54, 127, 1, 17, 87, 178, 142, 323, 1, 15, 87, 269, 565, 370, 835, 10, 116, 370, 896, 1766, 983, 2188, 9, 99, 499, 1473, 2776, 5446, 2627, 5798, 4, 91, 536, 2290, 5528, 8657, 16655, 7086, 15511
Offset: 0
Triangle T(n,k) begins:
1;
. 1, 1;
. . 2, 1, 1, 1;
. . . 4, 4, 4, 7, 3, 1, 1;
. . . . 9, 8, 16, 21, 17, 15, 10, 9, ... ;
. . . . . 21, 22, 54, 87, 87, 116, 99, ... ;
. . . . . . 51, 54, 178, 269, 370, 499, ... ;
. . . . . . . 127, 142, 565, 896, 1473, ... ;
. . . . . . . . 323, 370, 1766, 2776, ... ;
. . . . . . . . . 835, 983, 5446, ... ;
. . . . . . . . . . 2188, 2627, ... ;
Showing 1-4 of 4 results.