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.

A229345 Number A(n,k) of lattice paths from {n}^k to {0}^k using steps that decrement one component or all components by the same positive integer; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 7, 22, 4, 1, 1, 25, 248, 188, 8, 1, 1, 121, 6506, 11380, 1712, 16, 1, 1, 721, 292442, 2359348, 577124, 16098, 32, 1, 1, 5041, 19450082, 1088626684, 991365512, 30970588, 154352, 64, 1
Offset: 0

Views

Author

Alois P. Heinz, Sep 24 2013

Keywords

Examples

			A(2,2) = 22: [(2,2),(1,1),(0,0)], [(2,2),(1,1),(0,1),(0,0)], [(2,2),(1,1),(1,0),(0,0)], [(2,2),(0,0)], [(2,2),(1,2),(0,1),(0,0)], [(2,2),(1,2),(0,2),(0,1),(0,0)], [(2,2),(1,2),(0,2),(0,0)], [(2,2),(1,2),(1,1),(0,0)], [(2,2),(1,2),(1,1),(0,1),(0,0)], [(2,2),(1,2),(1,1),(1,0),(0,0)], [(2,2),(1,2),(1,0),(0,0)], [(2,2),(0,2),(0,1),(0,0)], [(2,2),(0,2),(0,0)], [(2,2),(2,1),(1,0),(0,0)], [(2,2),(2,1),(1,1),(0,0)], [(2,2),(2,1),(1,1),(0,1),(0,0)], [(2,2),(2,1),(1,1),(1,0),(0,0)], [(2,2),(2,1),(0,1),(0,0)], [(2,2),(2,1),(2,0),(1,0),(0,0)], [(2,2),(2,1),(2,0),(0,0)], [(2,2),(2,0),(1,0),(0,0)], [(2,2),(2,0),(0,0)].
Square array A(n,k) begins:
  1,  1,     1,        1,            1,                 1, ...
  1,  1,     3,        7,           25,               121, ...
  1,  2,    22,      248,         6506,            292442, ...
  1,  4,   188,    11380,      2359348,        1088626684, ...
  1,  8,  1712,   577124,    991365512,     4943064622568, ...
  1, 16, 16098, 30970588, 453530591824, 25162900228200976, ...
		

Crossrefs

Columns k=0-3 give: A000012, A011782, A132595(n+1), A229482.
Rows n=0-2 give: A000012, A038507 (for k>1), A229465.
Main diagonal gives: A229346.

Programs

  • Maple
    b:= proc(l) option remember; local m; m:= nops(l);
          `if`(m=0 or l[m]=0, 1,
          `if`(m>1, add(b(l-[j$m]), j=1..l[1]), 0)+
          add(add(b(sort(subsop(i=l[i]-j, l))), j=1..l[i]), i=1..m))
        end:
    A:= (n, k)-> b([n$k]):
    seq(seq(A(n, d-n), n=0..d), d=0..10);  # Alois P. Heinz, Sep 24 2013
  • Mathematica
    b[l_] := b[l] = With[{m = Length[l]}, If[m == 0 || l[[m]] == 0, 1, If[m > 1, Sum[b[l - Array[j&, m]], {j, 1, l[[1]]}],  0] + Sum[Sum[b[Sort[ReplacePart[l, i -> l[[i]] - j]]], {j, 1, l[[i]]}], {i, 1, m}]]]; a[n_, k_] := b[Array[n&, k]]; Table[Table[a[n, d-n], {n, 0, d}], {d, 0, 10}] // Flatten (* Jean-François Alcover, Dec 16 2013, translated from Maple *)