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.

User: Wenjin Woan

Wenjin Woan's wiki page.

Wenjin Woan has authored 8 sequences.

A131178 Non-plane increasing unary binary (0-1-2) trees where the nodes of outdegree 1 come in 2 colors.

Original entry on oeis.org

1, 2, 5, 16, 64, 308, 1730, 11104, 80176, 643232, 5676560, 54650176, 569980384, 6401959328, 77042282000, 988949446144, 13488013248256, 194780492544512, 2969094574403840, 47640794742439936, 802644553810683904, 14166772337295285248, 261410917571703825920
Offset: 1

Author

Wenjin Woan, Oct 31 2007

Keywords

Comments

A labeled tree of size n is a rooted tree on n nodes that are labeled by distinct integers from the set {1,...,n}. An increasing tree is a labeled tree such that the sequence of labels along any branch starting at the root is increasing. Thus the root of an increasing tree will be labeled 1. In unary binary trees (sometimes called 0-1-2 trees) the outdegree of a node is either 0, 1 or 2. Here we are counting non-plane (where the subtrees stemming from a node are not ordered between themselves) increasing unary binary trees where the nodes of outdegree 1 come in two colors. An example is given below. - Peter Bala, Sep 01 2011
The number of plane increasing 0-1-2 trees on n nodes, where the nodes of outdegree 1 come in two colors, is equal to n!. Other examples of sequences counting increasing trees include A000111, A000670, A008544, A008545, A029768 and A080635. - Peter Bala, Sep 01 2011
Number of plane increasing 0-1-2 trees, where the nodes of outdegree 1 come in 2 colors, avoiding pattern T213. See A278679 for more definitions and examples. - Sergey Kirgizov, Dec 24 2016

Examples

			G.f. = x + 2*x^2 + 5*x^3 + 16*x^4 + 64*x^5 + 308*x^6 + 1730*x^7 + 11104*x^8 + ...
a(3) = 5: Denoting the two types of node of outdegree 1 by the letters a or b, the 5 possible trees are
.
.  1a    1b    1a    1b      1
.  |     |     |     |      / \
.  2a    2b    2b    2a    2   3
.  |     |     |     |
.  3     3     3     3
- _Peter Bala_, Sep 01 2011
		

Programs

  • Maple
    E:=  (2*(exp(sqrt(2)*x)-1)) / ((2+sqrt(2))-(2-sqrt(2))*exp(sqrt(2)*x)):
    S:= map(simplify,series(E,x,101)):
    seq(coeff(S,x,j)*j!, j=1..100); # Robert Israel, Nov 23 2016
  • Mathematica
    max = 25; f[x_] := (2*(Exp[Sqrt[2]*x] - 1))/((2 + Sqrt[2]) - (2 - Sqrt[2])*Exp[Sqrt[2]*x]); Drop[ Simplify[ CoefficientList[ Series[f[x], {x, 0, max}], x]*Range[0, max]!], 1] (* Jean-François Alcover, Oct 05 2011 *)
  • PARI
    x='x+O('x^66); /* that many terms */
    default(realprecision,1000); /* working with floats here */
    egf=(2*(exp(sqrt(2)*x)-1)) / ((2+sqrt(2))-(2-sqrt(2))*exp(sqrt(2)*x));
    round(Vec(serlaplace(egf))) /* show terms */
    /* Joerg Arndt, Sep 01 2011 */
    
  • PARI
    /* the following program should be preferred. */
    Vec( serlaplace( serreverse( intformal( 1/(1+2*x+1/2*x^2) + O(x^66) ) ) ) )
    \\ Joerg Arndt, Mar 01 2014
    
  • PARI
    {a(n) = if( n<1, 0, n! * polcoeff( 2 / (-2 + quadgen(8) * (-1 + 2 / (1 - exp(-quadgen(8) * x + x * O(x^n))))), n))};

Formula

E.g.f.: A(x) = (2*(exp(sqrt(2)*x)-1)) / ((2+sqrt(2))-(2-sqrt(2))*exp(sqrt(2)*x)) = x+2*x^2/2!+5*x^3/3!+16*x^4/4!+64*x^5/5!+....
From Peter Bala, Sep 01 2011: (Start)
The generating function A(x) satisfies the autonomous differential equation A' = 1+2*A+1/2*A^2 with A(0) = 0. It follows that the inverse function A(x)^-1 may be expressed as an integral A(x)^-1 = int {t = 0..x} 1/(1+2*t+1/2*t^2).
Applying [Dominici, Theorem 4.1] to invert the integral gives the following method for calculating the terms of the sequence: let f(x) = 1+2*x+1/2*x^2. Let D be the operator f(x)*d/dx. Then a(n) = D^n(f(x)) evaluated at x = 0. Compare with A000111(n+1) = D^n(1+x+x^2/2!) evaluated at x = 0.
(End)
G.f.: 1/Q(0), where Q(k) = 1 - 2*x*(2*k+1) - m*x^2*(k+1)*(2*k+1)/( 1 - 2*x*(2*k+2) - m*x^2*(k+1)*(2*k+3)/Q(k+1) ) and m=1; (continued fraction). - Sergei N. Gladkovskii, Sep 24 2013
G.f.: 1/Q(0), where Q(k) = 1 - 2*x*(k+1) - 1/2*x^2*(k+1)*(k+2)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Oct 02 2013
a(n) ~ n! * 2^((n+3)/2) / log(3+2*sqrt(2))^(n+1). - Vaclav Kotesovec, Oct 08 2013
G.f.: conjecture: T(0)/(1-2*x) -1, where T(k) = 1 - x^2*(k+1)*(k+2)/(x^2*(k+1)*(k+2) - 2*(1-2*x*(k+1))*(1-2*x*(k+2))/Q(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Nov 19 2013
E.g.f.: x/(T(0)-x), where T(k) = 4*k + 1 + x^2/(8*k+6 + x^2/T(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Nov 30 2013

Extensions

Terms >= 80176 from Peter Bala, Sep 01 2011
Changed offset to 1 to agree with name and example. - Michael Somos, Nov 23 2016

A131638 Increasing binary trees having exactly two vertices with outdegree 1.

Original entry on oeis.org

1, 11, 180, 4288, 141584, 6213288, 350400832, 24718075136, 2133652515072, 221311262045440, 27166907582280704, 3895974311462313984, 645512064907811491840, 122381396964887716078592, 26325690425815766552887296, 6377608610246241663568248832
Offset: 1

Author

Wenjin Woan, Oct 03 2007

Keywords

Crossrefs

Programs

  • Mathematica
    Table[n!*SeriesCoefficient[1/2*(-((x*Sec[x/Sqrt[2]]^2 *Tan[x/Sqrt[2]]) /Sqrt[2]) + 3*Sec[x/Sqrt[2]]^2 *Tan[x/Sqrt[2]]^2), {x, 0, n}], {n, 2, 40, 2}] (* Vaclav Kotesovec after Michel Marcus, Sep 25 2013 *)
  • PARI
    lista(m) = { default(realprecision, 30); x = y + O(y^m); egf = (3*tan(x/sqrt(2))^2/cos(x/sqrt(2))^2-x*tan(x/sqrt(2))/(sqrt(2)*cos(x/sqrt(2))^2))/2; forstep (n=2, m, 2, print1(round(n!*polcoeff(egf, n, y)), ", "));}  \\ Michel Marcus, Mar 03 2013

Formula

E.g.f.: (3*sec(x/sqrt(2))^2*tan(x/sqrt(2))^2-x*sec(x/sqrt(2))^2*tan(x/sqrt(2))/(sqrt(2)))/2. - Michel Marcus, Mar 03 2013
a(n) ~ (2*n)! * 2^(n+6)*n^3/Pi^(2*n+4). - Vaclav Kotesovec, Sep 25 2013
From Klaus K Haverkamp, Jul 02 2023: (Start)
a(n) = (A002105(n+2) - (n+1)*A002105(n+1))/2.
a(n) = A094503(2n+1,n). (End)

Extensions

More terms from Michel Marcus, Mar 03 2013

A125307 Number of increasing trees with branches of height 1.

Original entry on oeis.org

1, 1, 4, 15, 80, 480, 3444, 27790, 253504, 2556792, 28382880, 343071168, 4490999424, 63253633872, 954133373088, 15343385194800, 262060291958784, 4737396899952384, 90370907329842432, 1814141041750834560, 38229440785429201920, 843786230514306621696
Offset: 1

Author

Wenjin Woan, Jan 17 2007

Keywords

References

  • R. P. Stanley, Enumerative Combinatorics, Vol. 1, Cambridge University Press, 1997. Proposition 1.3.16, p. 25.

Programs

  • Mathematica
    Range[0, 21]!CoefficientList[ Series[(x - 1 + Log[1 - x])/((1 - x)^2(Log[1 - x] - 1)), {x, 0, 21}], x] (* Robert G. Wilson v, Jan 26 2007 *)
  • Maxima
    a(n):=n!*(sum((-1)^(m)*(n-m+1)/(m-1)!*sum(k!*stirling1(m-1,k), k,1,m-1), m,2,n)+1); /* Vladimir Kruchinin, Sep 09 2010 */
    
  • PARI
    x='x+O('x^30); Vec(serlaplace( (x-1+log(1-x))/((x-1)^2*(log(1-x) -1)))) \\ G. C. Greubel, Sep 05 2018

Formula

E.g.f.: (x-1+log(1-x)) / ( (x-1)^2 (log(1-x)-1) ).
a(n) = n!*(sum((-1)^(m)*(n-m+1)/(m-1)!*sum(k!*Stirling1(m-1,k),k,1,m-1),m,2,n)+1). - Vladimir Kruchinin, Sep 09 2010
a(n) ~ n!*n*(1 - 1/log(n) + gamma/log(n)^2), where gamma is Euler-Mascheroni constant (A001620). - Vaclav Kotesovec, Sep 25 2013

Extensions

More terms from N. J. A. Sloane, Jan 26 2007

A125062 Number of increasing trees with hills of height 1.

Original entry on oeis.org

1, 1, 4, 15, 68, 370, 2364, 17388, 144864, 1349136, 13894560, 156831840, 1925527680, 25550778240, 364416917760, 5559659078400, 90349397913600, 1558170228787200, 28423674336153600, 546807873520742400, 11064204944529408000, 234902850943703040000, 5221386564941352960000
Offset: 0

Author

Wenjin Woan, Jan 09 2007

Keywords

Comments

If we discard the first 1 and set a(0)=1,a(1)=4, then a(n) = (n+1)!(H(n)+1), where H(n) = Sum_{k=1..n} 1/k. - Gary Detlefs, Jul 21 2010

References

  • R. P. Stanley, Enumerative Combinatorics, Vol. 1, Cambridge University Press, 1997, p25.

Crossrefs

Cf. A001620.

Programs

  • Maple
    a := n -> ifelse(n = 0, 1, (n - 1)! * (n*(harmonic(n) + 1) - 1)):
    seq(a(n), n = 0..22);  # Peter Luschny, Apr 09 2024
  • Mathematica
    With[{nn=20},CoefficientList[Series[(1+x Log[1/(1-x)])/(1-x),{x,0,nn}], x]Range[0,nn]!] (* Harvey P. Dale, Mar 14 2012 *)
    a[0]=1;a[n_]:=(n-1)*(n-1)!+Abs[StirlingS1[n+1,2]];Flatten[Table[a[n],{n,0,19}]] (* Detlef Meya, Apr 09 2024 *)
  • PARI
    x='x+O('x^30); Vec(serlaplace((1+x*log(1/(1-x)))/(1-x))) \\ G. C. Greubel, Aug 31 2018

Formula

E.g.f.: (1+x*log(1/(1-x)))/(1-x).
a(n) = 2*(n-1)*a(n-1) - (n^2-4*n+5)*a(n-2) - (n-3)*(n-2)*a(n-3). - Vaclav Kotesovec, Nov 19 2012
a(n) ~ n!*(log(n) + gamma + 1 + O(log(n)/n)), where gamma is Euler-Mascheroni constant (A001620). - Vaclav Kotesovec, Nov 19 2012
a(0) = 1; For n > 0; a(n) = (n - 1)*(n - 1)! + abs(Stirling1(n + 1, 2)). - Detlef Meya, Apr 09 2024

Extensions

Edited by the Associate Editors of the OEIS, Oct 05 2009

A079280 Number of log-concave paths of length n starting from the origin (0,0) with steps from {N=(0,1), E=(1,0) and S=(0,-1)} that stay in the second octant and never touch the line y=x except possibly at the beginning or the end.

Original entry on oeis.org

1, 2, 2, 5, 7, 17, 26, 62, 99, 233, 382, 890, 1486, 3434, 5812, 13340, 22819, 52073, 89846, 204002, 354522, 801422, 1401292, 3155300, 5546382, 12444842, 21977516, 49155332, 87167164, 194392628, 345994216, 769547192, 1374282019, 3049104233
Offset: 1

Author

Wenjin Woan, Feb 07 2003

Keywords

Comments

The first S step can only come after an E step.

Formula

G.f.: (1-x)/(2-4*x) + (1+3*x)/(2*sqrt(1-4*x^2));
a(2n) = (1/2)*(4^(n-1) + 3*binomial(2n-2, n-1));
a(2n+1) = (1/2)*(2*4^(n-1) + binomial(2n, n)).

Extensions

More terms from Max Alekseyev, Jul 04 2009

A059435 Number of lattice paths in plane starting at (0,0) and ending at (n,n) with steps from {(i,j): i+j > 0, i, j >= 0} that never go below the line y = x.

Original entry on oeis.org

1, 2, 12, 88, 720, 6304, 57792, 547712, 5323008, 52761088, 531311616, 5420488704, 55905767424, 581954543616, 6106210615296, 64513688174592, 685741070942208, 7328106153115648, 78684992821788672, 848487859401261056
Offset: 0

Author

Wenjin Woan, Feb 01 2001

Keywords

Comments

Series reversion of x(1-4x)/(1-2x). - Paul Barry, May 19 2005
The Hankel transform of this sequence is 8^C(n+1,2) = [1, 8, 512, 262144, ...]. - Philippe Deléham, Nov 08 2007

References

  • W.-J. Woan, A bijective proof by induction that the n-th term of this sequence is 2^(n-1) times of the n-th term of the big Schroeder number, 2001 (unpublished).

Crossrefs

Programs

  • Maple
    gf := (1+2*x-sqrt(4*x^2-12*x+1))/(8*x): s := series(gf, x, 100): for i from 0 to 50 do printf(`%d,`,coeff(s,x,i)) od:
  • Mathematica
    Table[SeriesCoefficient[(1+2*x-Sqrt[4*x^2-12*x+1])/(8*x),{x,0,n}],{n,0,20}] (* Vaclav Kotesovec, Oct 11 2012 *)
  • PARI
    x='x+O('x^66); Vec((1+2*x-sqrt(4*x^2-12*x+1))/(8*x)) \\ Joerg Arndt, May 06 2013

Formula

a(n) = 2^n*A001003(n).
G.f.: (1 + 2*x - sqrt(4*x^2 - 12*x + 1))/(8*x).
From Paul Barry, May 19 2005: (Start)
a(n) = (1/(n + 1)) * Sum_{k=0..n} C(n+1, k) * C(2*n-k, n)(-1)^k * 4^(n-k) * 2^k;
a(n) = Sum_{k=0..n} (1/n) * C(n, k) * C(n, k+1) * 4^k * 2^(n-k);
a(n) = Sum_{k=1..n} N(n, k)*2^(n+k-1), for n >= 1, where N(n, k) are the Narayana numbers (A001263). [Corrected by Alejandro H. Morales, May 14 2015]
(End)
Recurrence: (n+1)*a(n) = 6*(2*n-1)*a(n-1) - 4*(n-2)*a(n-2). - Vaclav Kotesovec, Oct 11 2012
a(n) ~ sqrt(4+3*sqrt(2))*(6+4*sqrt(2))^n/(4*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Oct 11 2012

A059231 Number of different lattice paths running from (0,0) to (n,0) using steps from S = {(k,k) or (k,-k): k positive integer} that never go below the x-axis.

Original entry on oeis.org

1, 1, 5, 29, 185, 1257, 8925, 65445, 491825, 3768209, 29324405, 231153133, 1841801065, 14810069497, 120029657805, 979470140661, 8040831465825, 66361595715105, 550284185213925, 4582462506008253, 38306388126997785, 321327658068506121, 2703925940081270205
Offset: 0

Author

Wenjin Woan, Jan 20 2001

Keywords

Comments

If y = x*A(x) then 4*y^2 - (1 + 3*x)*y + x = 0 and x = y*(1 - 4*y) / (1 - 3*y). - Michael Somos, Sep 28 2003
a(n) = A059450(n, n). - Michael Somos, Mar 06 2004
The Hankel transform of this sequence is 4^binomial(n+1,2). - Philippe Deléham, Oct 29 2007
a(n) is the number of Schroder paths of semilength n in which there are no (2,0)-steps at level 0 and at a higher level they come in 3 colors. Example: a(2)=5 because we have UDUD, UUDD, UBD, UGD, and URD, where U=(1,1), D=(1,-1), while B, G, and R are, respectively, blue, green, and red (2,0)-steps. - Emeric Deutsch, May 02 2011
Shifts left when INVERT transform applied four times. - Benedict W. J. Irwin, Feb 02 2016

Examples

			a(3) = 29 since the top row of Q^2 = (5, 8, 16, 0, 0, 0, ...), and 5 + 8 + 16 = 29.
		

Crossrefs

Row sums of A086873.
Column k=2 of A227578. - Alois P. Heinz, Jul 17 2013

Programs

  • Maple
    gf := (1+3*x-sqrt(9*x^2-10*x+1))/(8*x): s := series(gf, x, 100): for i from 0 to 50 do printf(`%d,`,coeff(s, x, i)) od:
    A059231_list := proc(n) local j, a, w; a := array(0..n); a[0] := 1;
    for w from 1 to n do a[w] := a[w-1]+4*add(a[j]*a[w-j-1],j=1..w-1) od;
    convert(a, list) end: A059231_list(20); # Peter Luschny, May 19 2011
  • Mathematica
    Join[{1},Table[-I 3^n/2LegendreP[n,-1,5/3],{n,40}]] (* Harvey P. Dale, Jun 09 2011 *)
    Table[Hypergeometric2F1[-n, 1 - n, 2, 4], {n, 0, 22}] (* Arkadiusz Wesolowski, Aug 13 2012 *)
  • PARI
    {a(n) = if( n<0, 0, polcoeff( (1 + 3*x - sqrt(1 - 10*x + 9*x^2 + x^2 * O(x^n))) / (8*x), n))}; /* Michael Somos, Sep 28 2003 */
    
  • PARI
    {a(n) = if( n<0, 0, n++; polcoeff( serreverse( x * (1 - 4*x) / (1 - 3*x) + x * O(x^n)), n))}; /* Michael Somos, Sep 28 2003 */
    
  • Sage
    # Algorithm of L. Seidel (1877)
    def A059231_list(n) :
        D = [0]*(n+2); D[1] = 1
        R = []; b = False; h = 1
        for i in range(2*n) :
            if b :
                for k in range(1, h, 1) : D[k] += 2*D[k+1]
            else :
                for k in range(h, 0, -1) : D[k] += 2*D[k-1]
                h += 1
            b = not b
            if b : R.append(D[1])
        return R
    A059231_list(23)  # Peter Luschny, Oct 19 2012

Formula

a(n) = Sum_{k=0..n} 4^k*N(n, k) where N(n, k) = (1/n)*binomial(n, k)*binomial(n, k+1) are the Narayana numbers (A001263). - Benoit Cloitre, May 10 2003
a(n) = 3^n/2*LegendreP(n, -1, 5/3). - Vladeta Jovovic, Sep 17 2003
G.f.: (1 + 3*x - sqrt(1 - 10*x + 9*x^2)) / (8*x) = 2 / (1 + 3*x + sqrt(1 - 10*x + 9*x^2)). - Michael Somos, Sep 28 2003
a(n) = Sum_{k=0..n} A088617(n, k)*4^k*(-3)^(n-k). - Philippe Deléham, Jan 21 2004
With offset 1: a(1)=1, a(n) = -3*a(n-1) + 4*Sum_{i=1..n-1} a(i)*a(n-i). - Benoit Cloitre, Mar 16 2004
D-finite with recurrence a(n) = (5(2n-1)a(n-1) - 9(n-2)a(n-2))/(n+1) for n>=2; a(0)=a(1)=1. - Emeric Deutsch, Mar 20 2004
Moment representation: a(n)=(1/(8*Pi))*Int(x^n*sqrt(-x^2+10x-9)/x,x,1,9)+(3/4)*0^n. - Paul Barry, Sep 30 2009
a(n) = upper left term in M^n, M = the production matrix:
1, 1
4, 4, 4
1, 1, 1, 1
4, 4, 4, 4, 4
1, 1, 1, 1, 1, 1
... - Gary W. Adamson, Jul 08 2011
a(n) is the sum of top row terms of Q^(n-1), where Q = the following infinite square production matrix:
1, 4, 0, 0, 0, ...
1, 1, 4, 0, 0, ...
1, 1, 1, 4, 0, ...
1, 1, 1, 1, 4, ...
... - Gary W. Adamson, Aug 23 2011
G.f.: (1+3*x-sqrt(9*x^2-10*x+1))/(8*x)=(1+3*x -G(0))/(4*x) ; G(k)= 1+x*3-x*4/G(k+1); (continued fraction, 1-step ). - Sergei N. Gladkovskii, Jan 05 2012
a(n) ~ sqrt(2)*3^(2*n+1)/(8*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Oct 11 2012
a(n) = A127846(n) for n>0. - Philippe Deléham, Apr 03 2013
0 = a(n)*(+81*a(n+1) - 225*a(n+2) + 36*a(n+3)) + a(n+1)*(+45*a(n+1) + 82*a(n+2) - 25*a(n+3)) + a(n+2)*(+5*a(n+2) + a(n+3)) for all n>=0. - Michael Somos, Aug 25 2014
G.f.: 1/(1 - x/(1 - 4*x/(1 - x/(1 - 4*x/(1 - x/(1 - ...)))))), a continued fraction. - Ilya Gutkovskiy, Aug 10 2017

A051485 Number of double nodes (exactly two nodes on that level) for all Motzkin paths of length n.

Original entry on oeis.org

0, 1, 1, 2, 6, 14, 32, 74, 180, 457, 1195, 3177, 8526, 23018, 62441, 170153, 465791, 1280956, 3538618, 9817619, 27348480, 76467497, 214532805, 603732396, 1703728554, 4819990947, 13667248631, 38834528740, 110556072877, 315290709729, 900635841754, 2576615923655, 7381956798465, 21177682172332, 60832837964492
Offset: 0

Author

Keywords

Examples

			Of the 9 Motzkin paths of length 4 the following 5 have a total of 6 double nodes:
|1......|
|2../\..|3..__..|2.._...|2..._..|2......|
|2./..\.|2./..\.|3./.\_.|3._/.\.|3./\/\.|
		

Crossrefs

Column k=2 of A372014.

Extensions

Edited by Michael Somos, Sep 29 2003
a(16)-a(34) from Alois P. Heinz, Apr 13 2024