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.

A274372 Number T(n,k) of modified skew Dyck paths of semilength n such that the area between the x-axis and the path is k; triangle T(n,k), n>=0, n<=k<=n^2, read by rows.

Original entry on oeis.org

1, 1, 1, 0, 1, 1, 0, 2, 1, 1, 0, 1, 1, 0, 3, 2, 3, 1, 3, 2, 2, 1, 1, 0, 1, 1, 0, 4, 3, 7, 4, 7, 5, 8, 6, 6, 3, 5, 4, 3, 2, 2, 1, 1, 0, 1, 1, 0, 5, 4, 12, 10, 17, 12, 20, 18, 22, 14, 19, 16, 18, 14, 14, 12, 12, 7, 8, 7, 5, 4, 3, 2, 2, 1, 1, 0, 1
Offset: 0

Views

Author

Alois P. Heinz, Jun 19 2016

Keywords

Comments

A modified skew Dyck path is a path in the first quadrant which begins at the origin, ends on the x-axis, consists of steps U=(1,1) (up), D=(1,-1) (down) and A=(-1,1) (anti-down) so that A and D steps do not overlap.

Examples

			T(3,3) = 1:   /\/\/\
.
                 /\         /\
T(3,5) = 2:   /\/  \   ,   /  \/\
.
              /\
              \ \
T(3,6) = 1:   /  \
.
               /\/\
T(3,7) = 1:   /    \
.
                /\
               /  \
T(3,9) = 1:   /    \
.
Triangle T(n,k) begins:
n\k: 0 1 2 3 4 5 6 7 8 9 . . . . . .16 . . . . . . . .25
---+----------------------------------------------------
00 : 1
01 :   1
02 :     1 0 1
03 :       1 0 2 1 1 0 1
04 :         1 0 3 2 3 1 3 2 2 1 1 0 1
05 :           1 0 4 3 7 4 7 5 8 6 6 3 5 4 3 2 2 1 1 0 1
		

Crossrefs

Row sums give: A230823.
Column sums give: A274376.
Cf. A000217, A002061 (number of terms in row n), A129172, A274054, A274373.

Programs

  • Maple
    b:= proc(x, y, t, n) option remember; expand(`if`(y>n, 0,
          `if`(n=y, `if`(t=2, 0, 1), b(x+1, y+1, 0, n-1)*z^
          (2*y+1)+`if`(t<>1 and x>0, b(x-1, y+1, 2, n-1), 0)+
          `if`(t<>2 and y>0, b(x+1, y-1, 1, n-1), 0))))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=n..n^2))(b(0$3, 2*n)):
    seq(T(n), n=0..8);
  • Mathematica
    b[x_, y_, t_, n_] := b[x, y, t, n] = Expand[If[y>n, 0, If[n == y, If[t == 2, 0, 1], b[x+1, y+1, 0, n-1]*z^(2*y+1) + If[t != 1 && x>0, b[x-1, y+1, 2, n-1], 0] + If[t != 2 && y>0, b[x+1, y-1, 1, n-1], 0]]]]; T[n_] := Function[p, Table[Coefficient[p, z, i], {i, n, n^2}]][b[0, 0, 0, 2*n]]; Table[T[n], {n, 0, 8}] // Flatten (* Jean-François Alcover, Jan 25 2017, translated from Maple *)

Formula

Sum_{k=n..n^2} k * T(n,k) = A274373(n).
T(n,n) = T(n,n^2) = 1.
T(n,n+1) = T(n,n^2-1) = 0.
T(n,n*(n+1)/2) = T(n,A000217(n)) = A274054(n).

A129173 Total area below all skew Dyck paths of semilength n.

Original entry on oeis.org

0, 1, 9, 58, 336, 1853, 9945, 52487, 273939, 1418567, 7303791, 37441560, 191287254, 974642943, 4955123955, 25146686730, 127424717400, 644873878895, 3260055588615, 16465301636090, 83092583965020, 419031686115875
Offset: 0

Views

Author

Emeric Deutsch, Apr 09 2007

Keywords

Comments

A skew Dyck path is a path in the first quadrant which begins at the origin, ends on the x-axis, consists of steps U=(1,1)(up), D=(1,-1)(down) and L=(-1,-1)(left) so that up and left steps do not overlap. The length of the path is defined to be the number of its steps.

Examples

			a(2)=9 because the areas below the skew Dyck paths UDUD, UUDD and UUDL are 2, 4 and 3, respectively.
		

Crossrefs

Programs

  • Maple
    a[0]:=1: a[1]:=1: a[2]:=9: for n from 3 to 25 do a[n]:=((11*n^2-20*n-6)*a[n-1]-5*(7*n^2-19*n+7)*a[n-2]+25*(n-1)*(n-3)*a[n-3])/(n+1)/(n-2) od: seq(a[n],n=0..25);
  • Mathematica
    CoefficientList[Series[(1+x)*(1-3*x-Sqrt[1-6*x+5*x^2])/(2*x*(1-5*x)), {x, 0, 20}], x] (* Vaclav Kotesovec, Oct 20 2012 *)
  • PARI
    z='z +O('z^25); concat([0], Vec((1+z)*(1-3*z-sqrt(1-6*z+5*z^2))/(2*z*(1-5*z)))) \\ G. C. Greubel, Feb 10 2017

Formula

a(n) = Sum_{k=0,..,n^2} k*A129172(n,k).
a(n) - 5*a(n-1) = A002212(n) + A002212(n-1).
G.f.: (1+z)*(1-3*z-sqrt(1-6*z+5*z^2))/(2*z*(1-5*z)).
(n+1)(n-2)a(n)-(11n^2-20n-6)a(n-1)+5(7n^2-19n+7)a(n-2)-25(n-1)(n-3)a(n-3) = 0.
a(n) ~ 6*5^(n-1)*(1-sqrt(5)/sqrt(Pi*n)) . - Vaclav Kotesovec, Oct 20 2012
Showing 1-2 of 2 results.