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

A135337 Number of Dyck paths of semilength n with no DUUU's starting at level 1.

Original entry on oeis.org

1, 1, 2, 5, 13, 36, 105, 320, 1011, 3289, 10957, 37216, 128435, 449142, 1588228, 5669505, 20403322, 73945553, 269647630, 988642372, 3642310793, 13476857235, 50059454347, 186598634398, 697777187275, 2616919372356, 9840647362248
Offset: 0

Views

Author

N. J. A. Sloane, Dec 07 2007

Keywords

Comments

Column 0 of A135331. - Emeric Deutsch, Dec 14 2007

Examples

			a(4)=13 because among the 14 (=A000108(4)) Dyck paths of semilength 14 only UDUUUDDD does not qualify.
a(4) = 13 since the top row of M^3 = [4, 5, 3, 1, 0, 0, 0, ...] with 13 = (4 + 5 + 3 + 1).
		

Crossrefs

Programs

  • Maple
    a := -2*x+1-sqrt(1-4*x); b := 2*(sqrt(1-4*x)*x+x^2);
    series((2*a+b)/(a+b), x=0, 30): seq(coeff(%,x,n), n=0..26); # after V. Kotesovec, Peter Luschny, Mar 20 2014
  • Mathematica
    CoefficientList[Series[1+x*((1-Sqrt[1-4*x])/(2*x))^2/(1+x^3*((1-Sqrt[1-4*x])/(2*x))^4), {x, 0, 20}], x] (* Vaclav Kotesovec, Mar 20 2014 *)
  • Maxima
    a(n):=sum(sum(k*binomial(2*m-k+1,m-k+1)*binomial(n-m-1,n-m-k),k,0,n-m)/(m+1),m,0,n); /* Vladimir Kruchinin, Jan 16 2018 */
  • PARI
    x='x+O('x^25); Vec(1+x*((1-sqrt(1-4*x))/(2*x))^2/(1+x^3*((1-sqrt(1-4*x))/(2*x))^4)) \\ G. C. Greubel, Feb 11 2017
    

Formula

G.f.: 1+z*C^2/(1+z^3*C^4) = (1-z)*(2*C-1)/[(1-2*z)*C + z], where C = (1-sqrt(1-4*z))/(2*z) is the g.f. of the Catalan numbers (A000108). - Emeric Deutsch, Dec 14 2007
From Gary W. Adamson, Jul 26 2011: (Start)
a(n) = sum of top row terms of M^(n-1), M = an infinite square production matrix as follows, in which a column of [1,1,0,0,0,...] is prepended to an infinite lower triangular matrix of all 1's and the rest zeros:
1, 1, 0, 0, 0, 0, ...
1, 1, 1, 0, 0, 0, ...
0, 1, 1, 1, 0, 0, ...
0, 1, 1, 1, 1, 0, ...
0, 1, 1, 1, 1, 1, ...
... (End)
a(n) ~ 3*4^(n+1)/(25*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Mar 20 2014
a(n) = A059019(n+1) - A059019(n), n>0. - Philippe Deléham, Oct 02 2014
a(n) = Sum_{m=0..n} 1/(m+1)*Sum_{k=0..n-m} k*C(2*m-k+1,m-k+1)*C(n-m-1,n-m-k). - Vladimir Kruchinin, Jan 16 2018

Extensions

More terms from Emeric Deutsch, Dec 14 2007

A059027 Number of Dyck paths of semilength n with no peak at height 4.

Original entry on oeis.org

1, 1, 2, 5, 13, 35, 97, 276, 805, 2404, 7343, 22916, 72980, 236857, 782275, 2625265, 8938718, 30834165, 107608097, 379454447, 1350434278, 4845475311, 17512579630, 63703732426, 233063976059, 857067469749, 3166309373615, 11745982220846
Offset: 0

Views

Author

N. J. A. Sloane, Feb 12 2001

Keywords

Examples

			1 + x + 2*x^2 + 5*x^3 + 13*x^4 + 35*x^5 + 97*x^6 + ...
		

References

  • Peart and Woan, in press, G_4(x).

Crossrefs

G_1, G_2, G_3, G_4 give A000957, A000108, A059019, A059027 resp.

Programs

  • Mathematica
    CoefficientList[Series[(2 - 3 x + x (1 - 4 x)^(1/2))/(2 - 5 x + x (1 - 4 x)^(1/2)), {x, 0, 40}], x] (* Vincenzo Librandi, Oct 05 2013 *)
  • PARI
    x='x+O('x^66); Vec((2-3*x+x*(1-4*x)^(1/2))/(2-5*x+x*(1-4*x)^(1/2))) \\ Joerg Arndt, Oct 03 2013

Formula

G.f.: (2-3*x+x*(1-4*x)^(1/2))/(2-5*x+x*(1-4*x)^(1/2)).
a(n) = sum(k=1..n-2, sum(j=max(2*k-n+1,0)..k-1, (binomial(k,j)*((k-j)*binomial(2*n-3*k+j-3,n-1-2*k+j)))/(n-k-1)*2^j))+2^(n-1). - Vladimir Kruchinin, Oct 03 2013
a(n) ~ 4^n/(9*sqrt(Pi)*n^(3/2)) * (1+197/(24*n)). - Vaclav Kotesovec, Mar 20 2014

A114489 Triangle read by rows: T(n,k) is the number of Dyck paths of semilength n that have k valleys at level 1.

Original entry on oeis.org

1, 1, 2, 4, 1, 9, 4, 1, 22, 14, 5, 1, 58, 46, 21, 6, 1, 163, 149, 80, 29, 7, 1, 483, 484, 292, 124, 38, 8, 1, 1494, 1589, 1044, 498, 179, 48, 9, 1, 4783, 5288, 3701, 1928, 780, 246, 59, 10, 1, 15740, 17848, 13096, 7304, 3237, 1152, 326, 71, 11, 1, 52956, 61060, 46428
Offset: 0

Views

Author

Emeric Deutsch, Dec 01 2005

Keywords

Comments

T(n,k) is also the number of Dyck paths of semilength n having k pairs of consecutive valleys at the same level. Example: T(4,1)=4 because we have U(DU)(DU)UDD, U(DU)UD(DU)D, UUD(DU)(DU)D, and UU(DU)(DU)DD, where U=(1,1), D=(1,-1); the pairs of consecutive same-level valleys are shown between parentheses. - Emeric Deutsch, Jun 19 2011
Rows 0 and 1 contain one term each; row n contains n-1 terms (n>=2).
Row sums are the Catalan numbers (A000108).
Column 0 yields A059019.
Sum(k*T(n,k), k=0..n-1) = 6*binomial(2*n-1,n-3)/(n+3) (A003517).

Examples

			T(4,1) = 4 because we have UU(DU)DDUD, UDUU(DU)DD, UU(DU)UDDD and UUUD(DU)DD, where U=(1,1), D=(1,-1); the valleys at level 1 are shown between parentheses.
Triangle starts:
1;
1;
2;
4,   1;
9,   4, 1;
22, 14, 5, 1;
		

Crossrefs

Programs

  • Maple
    C:=(1-sqrt(1-4*z))/2/z: G:=(1-t*z*C)/(1-t*z*C-z+t*z^2*C-z^2*C): Gser:=simplify(series(G,z=0,17)): P[0]:=1: for n from 1 to 12 do P[n]:=coeff(Gser,z^n) od: 1; 1; for n from 2 to 12 do seq(coeff(t*P[n],t^j),j=1..n-1) od; # yields sequence in triangular form
    # second Maple program:
    b:= proc(x, y, t) option remember; `if`(y>x or y<0, 0,
          `if`(x=0, 1, expand(b(x-1, y-1, 1)+
          `if`(t=1 and y=1, z, 1)*b(x-1, y+1, 0))))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(2*n, 0$2)):
    seq(T(n), n=0..14);  # Alois P. Heinz, Mar 12 2014
  • Mathematica
    b[x_, y_, t_] :=  b[x, y, t] = If[y>x || y<0, 0, If[x == 0, 1, Expand[b[x-1, y-1, 1] + If[t == 1 && y == 1, z, 1]*b[x-1, y+1, 0]]]]; T[n_] := Function[{p}, Table[Coefficient[p, z, i], {i, 0, Exponent[p, z]}]][b[2*n, 0, 0]]; Table[T[n], {n, 0, 14}] // Flatten (* Jean-François Alcover, May 20 2015, after Alois P. Heinz *)

Formula

G.f.: (1-t*z*C)/((1-z)*(1-t*z*C)-z^2*C), where C=(1-sqrt(1-4*z))/(2*z) is the Catalan function.
Showing 1-3 of 3 results.