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.

A328297 Number T(n,k) of n-step walks on cubic lattice starting at (0,0,0), ending at (x,y,z) with x=k, remaining in the first (nonnegative) octant and using steps (0,0,1), (0,1,0), (1,0,0), (-1,1,1), (1,-1,1), and (1,1,-1); triangle T(n,k), n>=0, 0<=k<=n, read by rows.

This page as a plain text file.
%I A328297 #27 May 12 2020 11:50:27
%S A328297 1,2,1,5,6,1,16,26,14,1,58,112,93,30,1,228,489,522,288,62,1,945,2182,
%T A328297 2737,2040,825,126,1,4072,9934,13934,12642,7210,2254,254,1,18078,
%U A328297 46016,70058,72994,52086,23878,5969,510,1,82172,216322,350648,404788,338520,198795,75570,15468,1022,1
%N A328297 Number T(n,k) of n-step walks on cubic lattice starting at (0,0,0), ending at (x,y,z) with x=k, remaining in the first (nonnegative) octant and using steps (0,0,1), (0,1,0), (1,0,0), (-1,1,1), (1,-1,1), and (1,1,-1); triangle T(n,k), n>=0, 0<=k<=n, read by rows.
%H A328297 Alois P. Heinz, <a href="/A328297/b328297.txt">Rows n = 0..140, flattened</a>
%H A328297 Wikipedia, <a href="https://en.wikipedia.org/wiki/Lattice_path">Lattice path</a>
%H A328297 Wikipedia, <a href="https://en.wikipedia.org/wiki/Self-avoiding_walk">Self-avoiding walk</a>
%e A328297 Triangle T(n,k) begins:
%e A328297      1;
%e A328297      2,    1;
%e A328297      5,    6,     1;
%e A328297     16,   26,    14,     1;
%e A328297     58,  112,    93,    30,    1;
%e A328297    228,  489,   522,   288,   62,    1;
%e A328297    945, 2182,  2737,  2040,  825,  126,   1;
%e A328297   4072, 9934, 13934, 12642, 7210, 2254, 254, 1;
%e A328297   ...
%p A328297 b:= proc(l) option remember; `if`(l[-1]=0, 1, (r-> add(
%p A328297       add(add(`if`(i+j+k=1, (h-> `if`(h[1]<0, 0, b(h)))(
%p A328297       sort(l-[i, j, k])), 0), k=r), j=r), i=r))([$-1..1]))
%p A328297     end:
%p A328297 T:= (n, k)-> add(b(sort([k, j, n-k-j])), j=0..n-k):
%p A328297 seq(seq(T(n, k), k=0..n), n=0..12);
%t A328297 b[l_] := b[l] = If[Last[l] == 0, 1, Sum[If[i + j + k == 1, Function[h, If[h[[1]] < 0, 0, b[h]]][Sort[l - {i, j, k}]], 0], {i, {-1, 0, 1}}, {j, {-1, 0, 1}}, {k, {-1, 0, 1}}]];
%t A328297 T[n_, k_] := Sum[b[Sort[{k, j, n - k - j}]], {j, 0, n - k}];
%t A328297 Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, May 12 2020, after Maple *)
%Y A328297 Column k=0 gives A328296.
%Y A328297 Main diagonal gives A000012.
%Y A328297 T(n,n-1) gives A000918(n+1).
%Y A328297 T(2n,n) gives A328427.
%Y A328297 Row sums give A328295.
%Y A328297 Cf. A038207, A328299, A328300.
%K A328297 nonn,tabl,walk
%O A328297 0,2
%A A328297 _Alois P. Heinz_, Oct 11 2019