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.

A227655 Number A(n,k) of lattice paths from {n}^k to {0}^k using steps that decrement one component by 1 such that for each point (p_1,p_2,...,p_k) we have abs(p_{i}-p_{i+1}) <= 1; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 6, 4, 1, 1, 1, 24, 44, 8, 1, 1, 1, 120, 896, 320, 16, 1, 1, 1, 720, 29392, 33904, 2328, 32, 1, 1, 1, 5040, 1413792, 7453320, 1281696, 16936, 64, 1, 1, 1, 40320, 93770800, 2940381648, 1897242448, 48447504, 123208, 128, 1, 1
Offset: 0

Views

Author

Alois P. Heinz, Jul 19 2013

Keywords

Examples

			A(2,2) = 2^2 = 4:
        (1,2)       (0,1)
       /     \     /     \
  (2,2)       (1,1)       (0,0)
       \     /     \     /
        (2,1)       (1,0)
Square array A(n,k) begins:
  1, 1,  1,     1,        1,            1, ...
  1, 1,  2,     6,       24,          120, ...
  1, 1,  4,    44,      896,        29392, ...
  1, 1,  8,   320,    33904,      7453320, ...
  1, 1, 16,  2328,  1281696,   1897242448, ...
  1, 1, 32, 16936, 48447504, 482913033152, ...
		

Crossrefs

Main diagonal gives A227673.

Programs

  • Maple
    b:= proc(l) option remember; `if`({l[]}={0}, 1, add(
          `if`(l[i]=0 or i>1 and 1 `if`(k<2, 1, b([n$k])):
    seq(seq(A(n, d-n), n=0..d), d=0..10);
  • Mathematica
    b[l_] := b[l] = If[Union[l] == {0}, 1, Sum[If[l[[i]] == 0 || i>1 && 1 < Abs[l[[i-1]] - l[[i]] + 1] || i l[[i]]-1]]], {i, 1, Length[l]}]]; a[n_, k_] := If[k<2, 1, b[Array[n&, k]]]; Table[Table[a[n, d - n], {n, 0, d}], {d, 0, 10}] // Flatten (* Jean-François Alcover, Dec 12 2013, translated from Maple *)

A320443 Number of lattice paths from {n}^n to {0}^n using steps that decrement one component by 1 such that for each point p we have abs(p_{i}-p_{(i mod n)+1}) <= 1 and the first component used is p_1.

Original entry on oeis.org

1, 1, 2, 72, 162000, 34907788800, 1178106009360998400, 8852509935316882311338419200, 20266951127950378632425380239663945561600, 18451222767137832036294073367248809725255450206074566400, 8461986175729341705763214274355536481199826590348664142270203923137228800
Offset: 0

Views

Author

Alois P. Heinz, Jan 09 2019

Keywords

Crossrefs

Main diagonal of A318191.

Formula

a(n) = A318191(n,n).

A322782 Number of lattice paths from {2}^n to {0}^n using steps that decrement one component by 1 such that for each point (p_1,p_2,...,p_n) we have abs(p_{i}-p_{i+1}) <= 1 and abs(p_{1}-p_{n}) <= 1.

Original entry on oeis.org

1, 1, 4, 36, 720, 23400, 1123200, 74440800, 6509318400, 725829724800, 100511918784000, 16922530756454400, 3404178048774758400, 806369627582929612800, 222159405758654317363200, 70435689828806256514560000, 25463217531292911649057996800, 10411540182139235537714555289600
Offset: 0

Views

Author

Woong-Gi Jung, Dec 26 2018

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(l) option remember; (n-> `if`(n<2 or max(l[])=0, 1,
          add(`if`(l[i]=0 or 1 b([2$n]):
    seq(a(n), n=0..12);  # Alois P. Heinz, Jan 05 2019
  • Mathematica
    b[l_] := b[l] = With[{n = Length[l]}, If[n < 2 || Max[l ] == 0, 1, Sum[If[ l[[i]] == 0 || 1 < Abs[l[[If[i == 1, 0, i] - 1]] - l[[i]] + 1] || 1 < Abs[l[[If[i == n, 0, i] + 1]] - l[[i]] + 1], 0, b[ReplacePart[l, i -> l[[i]] - 1]]], {i, n}]]];
    a[n_] := b[Table[2, {n}]];
    a /@ Range[0, 12] (* Jean-François Alcover, May 13 2020, after Alois P. Heinz *)

Formula

a(n) = n * A318191(2,n) for n > 0. - Alois P. Heinz, Jan 09 2019

Extensions

More terms from Alois P. Heinz, Dec 30 2018
Showing 1-3 of 3 results.