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

A191387 Triangle read by rows: T(n,k) is the number of dispersed Dyck paths of length n with k valleys at level 0.

Original entry on oeis.org

1, 1, 2, 3, 5, 1, 8, 2, 14, 5, 1, 23, 10, 2, 41, 22, 6, 1, 69, 42, 13, 2, 125, 87, 32, 7, 1, 214, 164, 66, 16, 2, 393, 330, 149, 43, 8, 1, 682, 618, 301, 94, 19, 2, 1267, 1225, 648, 227, 55, 9, 1, 2223, 2288, 1290, 484, 126, 22, 2, 4171, 4498, 2700, 1100, 322, 68, 10, 1, 7385, 8396, 5322, 2300, 718, 162, 25, 2
Offset: 0

Views

Author

Emeric Deutsch, Jun 02 2011

Keywords

Comments

A dispersed Dyck paths of length n is a Motzkin path of length n with no (1,0) steps at positive heights.
Row n >=2 has floor(n/2) entries.
Sum of entries in row n is binomial(n, floor(n/2)) = A001405(n).
T(n,0) = A191388(n).
Sum_{k>=0} k*T(n,k) = A191389(n).

Examples

			T(5,1)=2 because we have HUDUD and UDUDH, where U=(1,1), D=(1,-1), H=(1,0).
Triangle starts:
   1;
   1;
   2;
   3;
   5,  1;
   8,  2;
  14,  5,  1;
  23, 10,  2;
  41, 22,  6,  1;
  ...
		

Crossrefs

Programs

  • Maple
    G := (1+z^2*c-t*z^2*c)/(1-z-z^3*c-t*z^2*c*(1-z)): c := ((1-sqrt(1-4*z^2))*1/2)/z^2: Gser := simplify(series(G, z = 0, 20)): for n from 0 to 17 do P[n] := sort(coeff(Gser, z, n)) end do: 1; 1; for n from 2 to 17 do seq(coeff(P[n], t, k), k = 0 .. floor((1/2)*n)-1) end do; # yields sequence in triangular form

Formula

G.f.: G=G(t,z) is given by G = 1 + z*G + z^2*c*(t*(G-1-z*G) + 1 + z*G), where c = (1-sqrt(1-4*z^2))/(2*z^2).

A123514 Triangle read by rows: T(n,k) is the number of involutions of {1,2,...,n} with exactly k fixed points and which contain the pattern 321 exactly once (n>=3; 1<=k<=n-2).

Original entry on oeis.org

1, 0, 2, 4, 0, 3, 0, 10, 0, 4, 14, 0, 18, 0, 5, 0, 40, 0, 28, 0, 6, 48, 0, 81, 0, 40, 0, 7, 0, 150, 0, 140, 0, 54, 0, 8, 165, 0, 330, 0, 220, 0, 70, 0, 9, 0, 550, 0, 616, 0, 324, 0, 88, 0, 10, 572, 0, 1287, 0, 1040, 0, 455, 0, 108, 0, 11, 0, 2002, 0, 2548, 0, 1638, 0, 616, 0, 130, 0, 12
Offset: 3

Views

Author

Emeric Deutsch, Oct 13 2006

Keywords

Examples

			T(4,2)=2 because we have 1432 and 3214 (also 4231 is an involution with 2 fixed points but contains twice the pattern 321: 421 and 431).
Triangle starts:
    1;
    0,   2;
    4,   0,    3;
    0,  10,    0,   4;
   14,   0,   18,   0,    5;
    0,  40,    0,  28,    0,   6;
   48,   0,   81,   0,   40,   0,   7;
    0, 150,    0, 140,    0,  54,   0,  8;
  165,   0,  330,   0,  220,   0,  70,  0,   9;
    0, 550,    0, 616,    0, 324,   0, 88,   0, 10;
  572,   0, 1287,   0, 1040,   0, 455,  0, 108,  0, 11;
		

Crossrefs

Programs

  • Magma
    A123514:= func< n,k | ((1+(-1)^(n-k))/(2*(n+1)))*k*(k+3)*Binomial(n+1, Floor((n-k-2)/2)) >;
    [A123514(n,k): k in [1..n-2], n in [3..15]]; // G. C. Greubel, Jan 15 2022
    
  • Maple
    T:=proc(n,k) if n-k mod 2 = 0 and k<=n then k*(k+3)*binomial(n+1,(n-k)/2-1)/(n+1) else 0 fi end: for n from 3 to 15 do seq(T(n,k),k=1..n-2) od; # yields sequence in triangular form
  • Mathematica
    T[n_, k_]:= ((1+(-1)^(n-k))/2)*k*(k+3)*Binomial[n+1, (n-k-2)/2]/(n+1);
    Table[T[n, k], {n, 3, 15}, {k, n-2}]//Flatten (* G. C. Greubel, Jan 15 2022 *)
  • Sage
    def A123514(n,k): return ((1+(-1)^(n-k))/(2*(n+1)))*k*(k+3)*binomial(n+1, (n-k-2)//2)
    flatten([[A123514(n,k) for k in (1..n-2)] for n in (3..15)]) # G. C. Greubel, Jan 15 2022

Formula

T(n,k) = k*(k+3)*binomial(n+1,(n-k-2)/2)/(n+1), for n>=3, 1<=k<=n-2, n-k even.
From G. C. Greubel, Jan 15 2022: (Start)
Sum_{k=1..n-2} T(n, k) = A191389(n+1).
Sum_{k=1..floor((n-1)/2)} T(n-k, k) = ((1-(-1)^n)/2)*(12/(n+9))*binomial(n+2, (n- 3)/2). (End)

A191397 Triangle read by rows: T(n,k) is the number of dispersed Dyck paths of length n (i.e., Motzkin paths of length n with no (1,0)-steps at positive heights) having k DHU's (here U=(1,1), H=(1,0), and D=(1,-1)).

Original entry on oeis.org

1, 1, 2, 3, 6, 9, 1, 18, 2, 28, 7, 56, 14, 89, 37, 179, 72, 1, 289, 170, 3, 585, 326, 13, 956, 726, 34, 1948, 1380, 104, 3214, 2970, 250, 1, 6591, 5616, 659, 4, 10959, 11829, 1502, 20, 22609, 22300, 3647, 64, 37833, 46306, 8019, 220, 78486, 87154, 18495, 620, 1, 132037, 179222, 39648, 1804, 5
Offset: 0

Views

Author

Emeric Deutsch, Jun 04 2011

Keywords

Comments

Row n has 1+floor(n/5) entries.
Sum of entries in row n is binomial(n, floor(n/2)) = A001405(n).
T(n,0) = A191398(n).
Sum_{k>=0} k*T(n,k) = A191389(n-1).

Examples

			T(6,1)=2 because we have HU(DHU)D and U(DHU)DH, where U=(1,1), D=(1,-1), H=(1,0) (the DHU's are shown between parentheses).
Triangle starts:
   1;
   1;
   2;
   3;
   6;
   9,  1;
  18,  2;
  28,  7;
  56, 14;
		

Crossrefs

Programs

  • Maple
    G := 2/(1-z-2*z^3-t*z+2*t*z^3+(1-z+t*z)*sqrt(1-4*z^2)): Gser := simplify(series(G, z = 0, 25)): for n from 0 to 21 do P[n] := sort(coeff(Gser, z, n)) end do: for n from 0 to 21 do seq(coeff(P[n], t, k), k = 0 .. floor((1/5)*n)) end do; # yields sequence in triangular form

Formula

G.f.: G(t,z) = 2/(1-z-2*z^3-t*z+2*t*z^3+(1-z+t*z)*sqrt(1-4*z^2)).

A348013 Triangle by rows: T(n,k) is the number of n-step Dyck paths with k catastrophes.

Original entry on oeis.org

1, 1, 1, 3, 2, 1, 4, 7, 3, 1, 10, 14, 12, 4, 1, 15, 37, 31, 18, 5, 1, 35, 74, 90, 56, 25, 6, 1, 56, 176, 216, 179, 90, 33, 7, 1, 126, 352, 552, 492, 315, 134, 42, 8, 1, 210, 794, 1269, 1362, 966, 510, 189, 52, 9, 1, 462, 1588, 3033, 3480, 2890, 1716, 777, 256, 63, 10, 1, 792, 3473
Offset: 1

Views

Author

R. J. Mathar, Sep 24 2021

Keywords

Comments

T(n,k) is the number chains of k "incomplete" Dyck paths with a total length of n. (Incomplete Dyck paths are those not ending at the horizontal axis.) Each of the k subsections of the paths does not return to the horizontal axis; they are commonly referred to as paths with catastrophes (like black Fridays on stock market charts).

Examples

			The triangle starts
    1
    1    1
    3    2    1
    4    7    3    1
   10   14   12    4    1
   15   37   31   18    5    1
   35   74   90   56   25    6    1
   56  176  216  179   90   33    7    1
  126  352  552  492  315  134   42    8    1
  210  794 1269 1362  966  510  189   52    9    1
  462 1588 3033 3480 2890 1716  777  256   63   10    1
  792 3473 6781 8901 8060 5521 2835 1130  336   75   11    1
T(1,1)=1 counts U| where the vertical bar indicates starting a new path at the horizontal axis (the catastrophe).
T(2,1)=1 counts UU|.
T(4,1)=4 counts UUUU|, UUUD|, UUDU|, UDUU|.
T(3,2)=2 counts UU|U| and U|UU| .
T(4,2)=7 counts U|UUU|, U|UUD|, U|UDU|, UU|UU|, UUU|U|, UUD|U| and UDU|U|.
		

Crossrefs

Cf. A348012 (row sums), A037952 (k=1), A191389 (k=2).

Formula

T(n,1) = A037952(n).
T(n,2) = A191389(n+2).
The generating function of column k is g037952(x)^k, where g037952(x) = x +x^2 +3*x^3+... is the generating function of A037952.
Showing 1-4 of 4 results.