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.

Showing 1-3 of 3 results.

A328300 Number T(n,k) of n-step walks on cubic lattice starting at (0,0,0), ending at (0,k,n-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.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 7, 7, 1, 1, 15, 26, 15, 1, 1, 31, 82, 82, 31, 1, 1, 63, 237, 343, 237, 63, 1, 1, 127, 651, 1257, 1257, 651, 127, 1, 1, 255, 1730, 4256, 5594, 4256, 1730, 255, 1, 1, 511, 4494, 13669, 22411, 22411, 13669, 4494, 511, 1, 1, 1023, 11485, 42279, 83680, 103730, 83680, 42279, 11485, 1023, 1
Offset: 0

Views

Author

Alois P. Heinz, Oct 11 2019

Keywords

Examples

			Triangle T(n,k) begins:
  1;
  1,   1;
  1,   3,    1;
  1,   7,    7,    1;
  1,  15,   26,   15,    1;
  1,  31,   82,   82,   31,    1;
  1,  63,  237,  343,  237,   63,    1;
  1, 127,  651, 1257, 1257,  651,  127,   1;
  1, 255, 1730, 4256, 5594, 4256, 1730, 255, 1;
  ...
		

Crossrefs

Columns k=0-1 give: A000012, A000225.
Row sums give A328296.
T(2n,n) gives A328269.
T(n,floor(n/2)) gives A328280.

Programs

  • 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)-> b(sort([0, k, n-k])):
    seq(seq(T(n, k), k=0..n), n=0..12);
  • Mathematica
    b[l_List] := b[l] = If[l[[-1]] == 0, 1, Function[r, Sum[Sum[Sum[If[i + j + k == 1, Function[h, If[h[[1]] < 0, 0, b[h]]][Sort[l - {i, j, k}]], 0], {k, r}], {j, r}], {i, r}]][{-1, 0, 1}]];
    T[n_, k_] := b[Sort[{0, k, n - k}]];
    Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, May 10 2020, after Maple *)

Formula

T(n,k) = T(n,n-k).

A328269 Number of walks on cubic lattice starting at (0,0,0), ending at (0,n,n), 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).

Original entry on oeis.org

1, 3, 26, 343, 5594, 103730, 2094028, 44889351, 1006126370, 23337166962, 556199376622, 13550764116530, 336190200180652, 8468872074477060, 216120719672921820, 5577150906683145103, 145324963753397617230, 3819107708757101038562, 101122686499165125017886
Offset: 0

Views

Author

Alois P. Heinz, Oct 10 2019

Keywords

Examples

			a(1) = 3: [(0,0,0),(1,0,0),(0,1,1)], [(0,0,0),(0,1,0),(0,1,1)], [(0,0,0),(0,0,1),(0,1,1)].
a(2) = 26: [(0,0,0),(1,0,0),(2,0,0),(1,1,1),(0,2,2)], [(0,0,0),(1,0,0),(1,1,0),(1,1,1),(0,2,2)], ..., [(0,0,0),(0,0,1),(0,1,1),(0,1,2),(0,2,2)], [(0,0,0),(0,0,1),(0,0,2),(0,1,2),(0,2,2)].
		

Crossrefs

Bisection (even part) of A328280.

Programs

  • 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:
    a:= n-> b([0, n$2]):
    seq(a(n), n=0..23);
  • 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}}]];
    a[n_] := b[{0, n, n}];
    a /@ Range[0, 23] (* Jean-François Alcover, May 12 2020, after Maple *)

Formula

a(n) = A328300(2n,n).
a(n) is odd <=> n in { A000225 }.
a(n) ~ c * 2^(3*n) * (2 + sqrt(3))^n / n^2, where c =
0.081957778985952080274457799679795068000445171394180053136120884510526907545... - Vaclav Kotesovec, May 10 2020

A328281 Total number of nodes in all n-step walks on cubic lattice starting at (0,0,0), ending at (0,floor(n/2),ceiling(n/2)), 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).

Original entry on oeis.org

1, 2, 9, 28, 130, 492, 2401, 10056, 50346, 224110, 1141030, 5284200, 27222364, 129582278, 673340265, 3270171504, 17104148290, 84342959172, 443406172278, 2212675109180, 11680186909062, 58844537998598, 311667574680190, 1582458820299408, 8404755004516300
Offset: 0

Views

Author

Alois P. Heinz, Oct 10 2019

Keywords

Crossrefs

Cf. A328280.

Programs

  • 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:
    a:= n-> (t-> (n+1)*b([0, t, n-t]))(iquo(n, 2)):
    seq(a(n), n=0..31);
  • Mathematica
    b[l_] := b[l] = If[Last[l] == 0, 1, Function[r, Sum[If[i + j + k == 1, Function[h, If[h[[1]] < 0, 0, b[h]]][Sort[l - {i, j, k}]], 0], {i, r}, {j, r}, {k, r}]][{-1, 0, 1}]];
    a[n_] := Function[t, (n + 1) b[{0, t, n - t}]][Quotient[n, 2]];
    a /@ Range[0, 31] (* Jean-François Alcover, May 13 2020, after Maple *)

Formula

a(n) = (n+1) * A328280(n).
Showing 1-3 of 3 results.