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.

A333098 Number of closed Deutsch paths whose area is exactly n.

Original entry on oeis.org

1, 1, 1, 2, 4, 6, 11, 21, 36, 64, 117, 208, 371, 669, 1197, 2141, 3844, 6888, 12336, 22119, 39644, 71034, 127323, 228200, 408955, 732957, 1313647, 2354298, 4219447, 7562249, 13553161, 24290307, 43533784, 78022169, 139833177, 250612596, 449153751, 804984038
Offset: 0

Views

Author

Alois P. Heinz, Mar 07 2020

Keywords

Comments

Deutsch paths (named after their inventor Emeric Deutsch by Helmut Prodinger) are like Dyck paths where down steps can get to all lower levels. Open paths can end at any level, whereas closed paths have to return to the lowest level zero at the end.

Crossrefs

Cf. A330169.

Programs

  • Maple
    b:= proc(x, y, k) option remember; `if`(x=0, `if`(y=0
          and k=0, 1, 0), `if`(k2*x*y+x^2-x-y, 0,
          add(b(x-1, y-j, k-(2*y-j)), j=[-1, $1..y])))
        end:
    a:= n-> add(b(x, 0, 2*n), x=0..2*n):
    seq(a(n), n=0..40);
  • Mathematica
    b[x_, y_, k_] := b[x, y, k] = If[x == 0, If[y == 0 && k == 0, 1, 0], If[k < x || k > 2x y + x^2 - x - y, 0, Sum[b[x - 1, y - j, k - (2y - j)], {j, Join[{-1}, Range[y]]}]]];
    a[n_] := Sum[b[x, 0, 2n], {x, 0, 2n}];
    a /@ Range[0, 40] (* Jean-François Alcover, Mar 12 2020, after Alois P. Heinz *)