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.

A340590 Number of n*(n+1)-step n-dimensional nonnegative closed lattice walks starting at the origin and using steps that increment all components or decrement one component by 1.

Original entry on oeis.org

1, 1, 16, 24444, 8204167296, 1052109889288796160, 78607706455594117933558272000, 4825997038234002956322487606996722432307200, 325844502690869718672482402463320899403011435565608069632000, 31176247959648026790291638390172796940342899651173947284143811081979726010777600
Offset: 0

Views

Author

Alois P. Heinz, Jan 12 2021

Keywords

Examples

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

Crossrefs

Main diagonal of A340591.

Programs

  • Maple
    b:= proc(n, l) option remember; `if`(n=0, 1, (k-> add(
         `if`(l[i]>0, b(n-1, sort(subsop(i=l[i]-1, l))), 0), i=1..k)+
         `if`(add(i, i=l)+k x+1, l)), 0))(nops(l)))
        end:
    a:= n-> b(n*(n+1), [0$n]):
    seq(a(n), n=0..9);
  • Mathematica
    b[n_, l_] := b[n, l] = If[n == 0, 1, Function[k, Sum[
        If[l[[i]]>0, b[n-1, Sort[ReplacePart[l, i -> l[[i]]-1]]], 0], {i, 1, k}] +
        If[Sum[i, {i, l}] + k < n, b[n - 1, Map[#+1&, l]], 0]][Length[l]]];
    a[n_] := b[n(n+1), Table[0, {n}]];
    a /@ Range[0, 9] (* Jean-François Alcover, Jan 26 2021, after Alois P. Heinz *)

Formula

a(n) = A340591(n,n).