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-2 of 2 results.

A330169 a(n) is the total area of all closed Deutsch paths of length n.

Original entry on oeis.org

1, 3, 12, 39, 129, 411, 1300, 4065, 12633, 39046, 120204, 368844, 1128837, 3447303, 10508592, 31985085, 97226733, 295214316, 895502520, 2714106318, 8219809425, 24877611798, 75248738292, 227488953354, 687408882709, 2076269682831, 6268788729240, 18920387069731, 57086882549253
Offset: 2

Views

Author

Michel Marcus, Mar 05 2020

Keywords

Comments

Deutsch paths are a variation of Dyck paths that allow for down-steps of arbitrary length.

Crossrefs

Cf. A001006 (Motzkin numbers), A005043, A333017, A333098.

Programs

  • Maple
    a:= proc(n) option remember;`if`(n<4, [0$2, 1, 3][n+1], (4*n*
          a(n-1)+(2*n+4)*a(n-2)+12*(1-n)*a(n-3)+9*(1-n)*a(n-4))/(n+1))
        end:
    seq(a(n), n=2..30);  # Alois P. Heinz, Mar 05 2020
  • Mathematica
    a = DifferenceRoot[Function[{y, n}, {9(n+3)y[n] + 12(n+3)y[n+1] - 2(n+6)y[n+2] - 4(n+4)y[n+3] + (n+5)y[n+4] == 0, y[2] == 1, y[3] == 3, y[4] == 12, y[5] == 39}]];
    a /@ Range[2, 30] (* Jean-François Alcover, Mar 12 2020 *)
  • PARI
    my(z='z+O('z^30), v=(1-z-sqrt(1-2*z-3*z^2))/(2*z)); Vec(v^2*(1+v+v^2)^2/((1+v)^3*(1-v)^2))

Formula

G.f.: v^2*(1+v+v^2)^2/((1+v)^3*(1-v)^2) where v=(1-z-sqrt(1-2*z-3*z^2))/(2*z), that is, where v is the g.f. of A001006.

A333114 Sum over all closed Deutsch paths of length n of products over all peaks p of x_p/y_p, where x_p and y_p are the coordinates of peak p.

Original entry on oeis.org

1, 0, 1, 1, 5, 11, 44, 134, 529, 1902, 7793, 31068, 133641, 574259, 2594969, 11842726, 56083004, 269450143, 1333170844, 6703500545, 34548749471, 181026885253, 969167994094, 5273977173249, 29257773480987, 164894374634333, 945779302210358, 5507572390808676
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.

Examples

			a(4) = (1/1)*(3/1) + 2/2 + 3/3 = 5.
		

Crossrefs

Programs

  • Maple
    b:= proc(x, y, t) option remember; `if`(x=0, 1, add(
          `if`(t and j<0, x/y, 1)*b(x-1, y+j, is(j>0)), j=[
          `if`(y=0, [][], -1), $1..x-1-y]))
        end:
    a:= n-> b(n, 0, false):
    seq(a(n), n=0..30);
  • Mathematica
    b[x_, y_, t_] := b[x, y, t] = If[x == 0, 1, Sum[If[t && j < 0, x/y, 1]* b[x-1, y+j, j > 0], {j, Join[If[y == 0, {}, {-1}], Range[x-1-y]]}]];
    a[n_] := b[n, 0, False];
    a /@ Range[0, 30] (* Jean-François Alcover, Mar 19 2020, after Alois P. Heinz *)
Showing 1-2 of 2 results.