login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A223092
Triangle read by rows: let T(n,k) (for n >= 0, 0 <= k <= n) be the number of walks from (0,0) to (n,k) using steps (1,1), (1,0), (1,-1) and (0,-1); n-th row of triangle gives T(n,n), T(n,n-1), ..., T(n,0).
2
1, 1, 2, 1, 4, 7, 1, 6, 18, 29, 1, 8, 33, 86, 133, 1, 10, 52, 179, 431, 650, 1, 12, 75, 316, 978, 2238, 3319, 1, 14, 102, 505, 1874, 5406, 11941, 17498, 1, 16, 133, 754, 3235, 11020, 30241, 65086, 94525, 1, 18, 168, 1071, 5193, 20202, 64698, 171045, 360897, 520508, 1, 20, 207, 1464, 7896, 34362, 124455, 380400, 977040, 2029490, 2910895
OFFSET
0,3
LINKS
M. Dziemianczuk, Counting Lattice Paths With Four Types of Steps, Graphs and Combinatorics, September 2013
FORMULA
T(n,k) = T(n,k+1) + T(n-1,k+1) + T(n-1,k) + T(n-1,k-1). - Philippe Deléham, Mar 29 2013
EXAMPLE
Triangle begins:
[1]
[1, 2]
[1, 4, 7]
[1, 6, 18, 29]
[1, 8, 33, 86, 133]
[1, 10, 52, 179, 431, 650]
[1, 12, 75, 316, 978, 2238, 3319]
...
The T(n,k) array begins:
4: 0 0 0 0 1 10 ...
3: 0 0 0 1 8 52 ...
2: 0 0 1 6 33 179 ...
1: 0 1 4 18 86 431 ...
0: 1 2 7 29 133 650 ...
-------------------------
k/n:0 1 2 3 4 5 ...
T(5,2) = T(5,3) + T(4,3) + T(4,2) + T(4,1) = 52 + 8 + 33 + 86 = 179.- Philippe Deléham, Mar 29 2013
This is also Dziemianczuk's array N(-i,i+j) read by antidiagonals:
1,2,7,29,133,650,3319,17498, ...
1,4,18,86,431,2238,11941,65086, ...
1,6,33,179,978,5406,30241,171045, ...
1,8,52,316,1874,11020,64698,380400, ...
1,10,75,505,3235,20202,124455,761160, ...
... - N. J. A. Sloane, Dec 05 2013
MAPLE
T:= proc(n, k) option remember; `if`(n=0 and k=0, 1,
`if`(n<0 or k<0 or k>n, 0, add(T(n-l[1], k-l[2]),
l=[[1, 1], [1, 0], [1, -1], [0, -1]]) ))
end:
seq(seq(T(n, n-j), j=0..n), n=0..10); # Alois P. Heinz, Apr 08 2013
MATHEMATICA
max = 10; T[0, 0] = 1; T[n_ /; n >= 0, k_ /; 0 <= k <= max] := T[n, k] = T[n, k+1]+T[n-1, k+1]+T[n-1, k]+T[n-1, k-1]; T[n_, k_] = 0; Table[Table[T[n, k], {k, n, 0, -1}], {n, 0, max}] // Flatten (* Jean-François Alcover, Mar 07 2014, after Philippe Deléham *)
CROSSREFS
Cf. A064641 (T(n,0)), A071943, A052709.
Sequence in context: A341696 A052566 A234946 * A071948 A193589 A187115
KEYWORD
nonn,tabl
AUTHOR
N. J. A. Sloane, Mar 29 2013
STATUS
approved