login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 6
1, 2, 1, 5, 6, 1, 16, 26, 14, 1, 58, 112, 93, 30, 1, 228, 489, 522, 288, 62, 1, 945, 2182, 2737, 2040, 825, 126, 1, 4072, 9934, 13934, 12642, 7210, 2254, 254, 1, 18078, 46016, 70058, 72994, 52086, 23878, 5969, 510, 1, 82172, 216322, 350648, 404788, 338520, 198795, 75570, 15468, 1022, 1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

0,2

LINKS

Alois P. Heinz, Rows n = 0..140, flattened

Wikipedia, Lattice path

Wikipedia, Self-avoiding walk

EXAMPLE

Triangle T(n,k) begins:

     1;

     2,    1;

     5,    6,     1;

    16,   26,    14,     1;

    58,  112,    93,    30,    1;

   228,  489,   522,   288,   62,    1;

   945, 2182,  2737,  2040,  825,  126,   1;

  4072, 9934, 13934, 12642, 7210, 2254, 254, 1;

  ...

MAPLE

b:= proc(l) option remember; `if`(l[-1]=0, 1, (r-> add(

      add(add(`if`(i+j+k=1, (h-> `if`(h[1]<0, 0, b(h)))(

      sort(l-[i, j, k])), 0), k=r), j=r), i=r))([$-1..1]))

    end:

T:= (n, k)-> add(b(sort([k, j, n-k-j])), j=0..n-k):

seq(seq(T(n, k), k=0..n), n=0..12);

MATHEMATICA

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[n_, k_] := Sum[b[Sort[{k, j, n - k - j}]], {j, 0, n - k}];

Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-Fran├žois Alcover, May 12 2020, after Maple *)

CROSSREFS

Column k=0 gives A328296.

Main diagonal gives A000012.

T(n,n-1) gives A000918(n+1).

T(2n,n) gives A328427.

Row sums give A328295.

Cf. A038207, A328299, A328300.

Sequence in context: A217204 A179455 A039810 * A124575 A178121 A302595

Adjacent sequences:  A328294 A328295 A328296 * A328298 A328299 A328300

KEYWORD

nonn,tabl,walk

AUTHOR

Alois P. Heinz, Oct 11 2019

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 26 17:22 EST 2021. Contains 341632 sequences. (Running on oeis4.)