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-5 of 5 results.

A328347 Number T(n,k) of n-step walks on cubic lattice starting at (0,0,0), ending at (0,k,n-k) 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, 3, 4, 3, 7, 15, 15, 7, 19, 52, 72, 52, 19, 51, 175, 300, 300, 175, 51, 141, 576, 1185, 1480, 1185, 576, 141, 393, 1869, 4473, 6685, 6685, 4473, 1869, 393, 1107, 6000, 16380, 28392, 33880, 28392, 16380, 6000, 1107, 3139, 19107, 58572, 115332, 159264, 159264, 115332, 58572, 19107, 3139
Offset: 0

Views

Author

Alois P. Heinz, Oct 13 2019

Keywords

Comments

These walks are not restricted to the first (nonnegative) octant.

Examples

			Triangle T(n,k) begins:
     1;
     1,    1;
     3,    4,     3;
     7,   15,    15,     7;
    19,   52,    72,    52,    19;
    51,  175,   300,   300,   175,    51;
   141,  576,  1185,  1480,  1185,   576,   141;
   393, 1869,  4473,  6685,  6685,  4473,  1869,  393;
  1107, 6000, 16380, 28392, 33880, 28392, 16380, 6000, 1107;
  ...
		

Crossrefs

Columns k=0-1 give: A002426, A132894 = n*A005773(n).
Row sums give A084609.
T(2n,n) gives A328426.

Programs

  • Maple
    b:= proc(l) option remember; `if`(l[-1]=0, 1, (r-> add(add(
          add(`if`(i+j+k=1, (h-> `if`(add(t, t=h)<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, Sum[If[i + j + k == 1, Function[h, If[Total[h] < 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_] := b[Sort[{0, k, n - k}]];
    Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Apr 30 2020, after Alois P. Heinz *)

Formula

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

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.

Original entry on oeis.org

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
Offset: 0

Views

Author

Alois P. Heinz, Oct 11 2019

Keywords

Examples

			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;
  ...
		

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.

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)-> 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 *)

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

A328280 Number of 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, 1, 3, 7, 26, 82, 343, 1257, 5594, 22411, 103730, 440350, 2094028, 9255877, 44889351, 204385719, 1006126370, 4685719954, 23337166962, 110633755459, 556199376622, 2674751727209, 13550764116530, 65935784179142, 336190200180652, 1651985253047884
Offset: 0

Views

Author

Alois P. Heinz, Oct 10 2019

Keywords

Crossrefs

Bisection gives A328269 (even part).

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

Formula

a(n) = A328300(n,floor(n/2)).

A328296 Number of n-step walks on cubic lattice starting at (0,0,0), ending at (0,y,z), 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, 5, 16, 58, 228, 945, 4072, 18078, 82172, 380666, 1791138, 8537912, 41146988, 200169891, 981705400, 4848820372, 24098703860, 120433164750, 604831645542, 3050979757728, 15451575335362, 78536766518038, 400497435480332, 2048473941706016, 10506489209380466
Offset: 0

Views

Author

Alois P. Heinz, Oct 11 2019

Keywords

Crossrefs

Column k=0 of A328297.
Row sums of A328300.

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-> add(b(sort([0, j, n-j])), j=0..n):
    seq(a(n), n=0..29);
  • 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_] := Sum[b[Sort[{0, j, n  - j}]], {j, 0, n }];
    a /@ Range[0, 29] (* Jean-François Alcover, May 12 2020, after Maple *)

Formula

a(n) is odd <=> n in { A000918 } and n >= 0.
Showing 1-5 of 5 results.