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.

This page as a plain text file.
%I A340590 #16 Jan 26 2021 08:50:22
%S A340590 1,1,16,24444,8204167296,1052109889288796160,
%T A340590 78607706455594117933558272000,
%U A340590 4825997038234002956322487606996722432307200,325844502690869718672482402463320899403011435565608069632000,31176247959648026790291638390172796940342899651173947284143811081979726010777600
%N 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.
%H A340590 Alois P. Heinz, <a href="/A340590/b340590.txt">Table of n, a(n) for n = 0..12</a>
%F A340590 a(n) = A340591(n,n).
%e A340590 a(2) = 16:
%e A340590   [(0,0),(1,1),(0,1),(0,0),(1,1),(0,1),(0,0)],
%e A340590   [(0,0),(1,1),(0,1),(0,0),(1,1),(1,0),(0,0)],
%e A340590   [(0,0),(1,1),(0,1),(1,2),(0,2),(0,1),(0,0)],
%e A340590   [(0,0),(1,1),(0,1),(1,2),(1,1),(0,1),(0,0)],
%e A340590   [(0,0),(1,1),(0,1),(1,2),(1,1),(1,0),(0,0)],
%e A340590   [(0,0),(1,1),(1,0),(0,0),(1,1),(0,1),(0,0)],
%e A340590   [(0,0),(1,1),(1,0),(0,0),(1,1),(1,0),(0,0)],
%e A340590   [(0,0),(1,1),(1,0),(2,1),(1,1),(0,1),(0,0)],
%e A340590   [(0,0),(1,1),(1,0),(2,1),(1,1),(1,0),(0,0)],
%e A340590   [(0,0),(1,1),(1,0),(2,1),(2,0),(1,0),(0,0)],
%e A340590   [(0,0),(1,1),(2,2),(1,2),(0,2),(0,1),(0,0)],
%e A340590   [(0,0),(1,1),(2,2),(1,2),(1,1),(0,1),(0,0)],
%e A340590   [(0,0),(1,1),(2,2),(1,2),(1,1),(1,0),(0,0)],
%e A340590   [(0,0),(1,1),(2,2),(2,1),(1,1),(0,1),(0,0)],
%e A340590   [(0,0),(1,1),(2,2),(2,1),(1,1),(1,0),(0,0)],
%e A340590   [(0,0),(1,1),(2,2),(2,1),(2,0),(1,0),(0,0)].
%p A340590 b:= proc(n, l) option remember; `if`(n=0, 1, (k-> add(
%p A340590      `if`(l[i]>0, b(n-1, sort(subsop(i=l[i]-1, l))), 0), i=1..k)+
%p A340590      `if`(add(i, i=l)+k<n, b(n-1, map(x-> x+1, l)), 0))(nops(l)))
%p A340590     end:
%p A340590 a:= n-> b(n*(n+1), [0$n]):
%p A340590 seq(a(n), n=0..9);
%t A340590 b[n_, l_] := b[n, l] = If[n == 0, 1, Function[k, Sum[
%t A340590     If[l[[i]]>0, b[n-1, Sort[ReplacePart[l, i -> l[[i]]-1]]], 0], {i, 1, k}] +
%t A340590     If[Sum[i, {i, l}] + k < n, b[n - 1, Map[#+1&, l]], 0]][Length[l]]];
%t A340590 a[n_] := b[n(n+1), Table[0, {n}]];
%t A340590 a /@ Range[0, 9] (* _Jean-François Alcover_, Jan 26 2021, after _Alois P. Heinz_ *)
%Y A340590 Main diagonal of A340591.
%Y A340590 Cf. A002378, A034841.
%K A340590 nonn,walk
%O A340590 0,3
%A A340590 _Alois P. Heinz_, Jan 12 2021