cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A306814 Number T(n,k) of n-step paths from (0,0) to (0,k) that stay in the first quadrant (but may touch the axes) consisting of steps (-1,0), (0,1), (0,-1) and (1,-1); triangle T(n,k), n>=0, 0<=k<=n, read by rows.

This page as a plain text file.
%I A306814 #24 May 14 2020 07:50:01
%S A306814 1,0,1,1,0,1,1,2,0,1,2,3,3,0,1,7,5,6,4,0,1,10,23,9,10,5,0,1,38,35,51,
%T A306814 14,15,6,0,1,89,131,84,94,20,21,7,0,1,229,355,309,168,155,27,28,8,0,1,
%U A306814 752,874,947,608,300,237,35,36,9,0,1,1873,3081,2292,2075,1070,495,343,44,45,10,0,1
%N A306814 Number T(n,k) of n-step paths from (0,0) to (0,k) that stay in the first quadrant (but may touch the axes) consisting of steps (-1,0), (0,1), (0,-1) and (1,-1); triangle T(n,k), n>=0, 0<=k<=n, read by rows.
%H A306814 Alois P. Heinz, <a href="/A306814/b306814.txt">Rows n = 0..200, flattened</a>
%e A306814 T(4,2) = 3:
%e A306814   [(0,0), (0,1), (0,0), (0,1), (0,2)],
%e A306814   [(0,0), (0,1), (0,2), (0,1), (0,2)],
%e A306814   [(0,0), (0,1), (0,2), (0,3), (0,2)].
%e A306814 Triangle T(n,k) begins:
%e A306814     1;
%e A306814     0,   1;
%e A306814     1,   0,   1;
%e A306814     1,   2,   0,   1;
%e A306814     2,   3,   3,   0,   1;
%e A306814     7,   5,   6,   4,   0,   1;
%e A306814    10,  23,   9,  10,   5,   0,  1;
%e A306814    38,  35,  51,  14,  15,   6,  0,  1;
%e A306814    89, 131,  84,  94,  20,  21,  7,  0, 1;
%e A306814   229, 355, 309, 168, 155,  27, 28,  8, 0, 1;
%e A306814   752, 874, 947, 608, 300, 237, 35, 36, 9, 0, 1;
%e A306814   ...
%p A306814 b:= proc(n, x, y) option remember; `if`(min(n, x, y, n-x-y)<0, 0,
%p A306814       `if`(n=0, 1, add(b(n-1, x-d[1], y-d[2]),
%p A306814        d=[[-1, 0], [0, 1], [0, -1], [1, -1]])))
%p A306814     end:
%p A306814 T:= (n, k)-> b(n, 0, k):
%p A306814 seq(seq(T(n, k), k=0..n), n=0..12);
%t A306814 b[n_, x_, y_] := b[n, x, y] = If[Min[n, x, y, n - x - y] < 0, 0, If[n == 0, 1, Sum[b[n - 1, x - d[[1]], y - d[[2]]], {d, {{-1, 0}, {0, 1}, {0, -1}, {1, -1}}}]]];
%t A306814 T[n_, k_] := b[n, 0, k];
%t A306814 Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, May 14 2020, after Maple *)
%Y A306814 Column k=0 gives A151346.
%Y A306814 Row sums give A151404.
%Y A306814 T(2n,n) gives A306813.
%Y A306814 T(n+1,n-1) gives A001477.
%Y A306814 T(n+2,n-1) gives A000217.
%Y A306814 T(n+3,n-1) gives A000096.
%Y A306814 Cf. A199915.
%K A306814 nonn,tabl,walk
%O A306814 0,8
%A A306814 _Alois P. Heinz_, Mar 11 2019