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

A088218 Total number of leaves in all rooted ordered trees with n edges.

Original entry on oeis.org

1, 1, 3, 10, 35, 126, 462, 1716, 6435, 24310, 92378, 352716, 1352078, 5200300, 20058300, 77558760, 300540195, 1166803110, 4537567650, 17672631900, 68923264410, 269128937220, 1052049481860, 4116715363800, 16123801841550, 63205303218876, 247959266474052
Offset: 0

Views

Author

Michael Somos, Sep 24 2003

Keywords

Comments

Essentially the same as A001700, which has more information.
Note that the unique rooted tree with no edges has no leaves, so a(0)=1 is by convention. - Michael Somos, Jul 30 2011
Number of ordered partitions of n into n parts, allowing zeros (cf. A097070) is binomial(2*n-1,n) = a(n) = essentially A001700. - Vladeta Jovovic, Sep 15 2004
Hankel transform is A000027; example: Det([1,1,3,10;1,3,10,35;3,10,35,126; 10,35,126,462]) = 4. - Philippe Deléham, Apr 13 2007
a(n) is the number of functions f:[n]->[n] such that for all x,y in [n] if xA045992(n). - Geoffrey Critzer, Apr 02 2009
Hankel transform of the aeration of this sequence is A000027 doubled: 1,1,2,2,3,3,... - Paul Barry, Sep 26 2009
The Fi1 and Fi2 triangle sums of A039599 are given by the terms of this sequence. For the definitions of these triangle sums see A180662. - Johannes W. Meijer, Apr 20 2011
Alternating row sums of Riordan triangle A094527. See the Philippe Deléham formula. - Wolfdieter Lang, Nov 22 2012
(-2)*a(n) is the Z-sequence for the Riordan triangle A110162. For the notion of Z- and A-sequences for Riordan arrays see the W. Lang link under A006232 with details and references. - Wolfdieter Lang, Nov 22 2012
From Gus Wiseman, Jun 27 2021: (Start)
Also the number of integer compositions of 2n with alternating (or reverse-alternating) sum 0 (ranked by A344619). This is equivalent to Ran Pan's comment at A001700. For example, the a(0) = 1 through a(3) = 10 compositions are:
() (11) (22) (33)
(121) (132)
(1111) (231)
(1122)
(1221)
(2112)
(2211)
(11121)
(12111)
(111111)
For n > 0, a(n) is also the number of integer compositions of 2n with alternating sum 2.
(End)
Number of terms in the expansion of (x_1+x_2+...+x_n)^n. - César Eliud Lozada, Jan 08 2022

Examples

			G.f. = 1 + x + 3*x^2 + 10*x^3 + 35*x^4 + 126*x^5 + 462*x^6 + 1716*x^7 + ...
The five rooted ordered trees with 3 edges have 10 leaves.
..x........................
..o..x.x..x......x.........
..o...o...o.x..x.o..x.x.x..
..r...r....r....r.....r....
		

References

  • L. W. Shapiro and C. J. Wang, Generating identities via 2 X 2 matrices, Congressus Numerantium, 205 (2010), 33-46.

Crossrefs

Same as A001700 modulo initial term and offset.
First differences are A024718.
Main diagonal of A071919 and of A305161.
A signed version is A110556.
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
A003242 counts anti-run compositions.
A025047 counts wiggly compositions (ascend: A025048, descend: A025049).
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A106356 counts compositions by number of maximal anti-runs.
A124754 gives the alternating sum of standard compositions.
A345197 counts compositions by sum, length, and alternating sum.
Compositions of n, 2n, or 2n+1 with alternating/reverse-alternating sum k:
- k = 0: counted by A088218 (this sequence), ranked by A344619/A344619.
- k = 1: counted by A000984, ranked by A345909/A345911.
- k = -1: counted by A001791, ranked by A345910/A345912.
- k = 2: counted by A088218 (this sequence), ranked by A345925/A345922.
- k = -2: counted by A002054, ranked by A345924/A345923.
- k >= 0: counted by A116406, ranked by A345913/A345914.
- k <= 0: counted by A058622(n-1), ranked by A345915/A345916.
- k > 0: counted by A027306, ranked by A345917/A345918.
- k < 0: counted by A294175, ranked by A345919/A345920.
- k != 0: counted by A058622, ranked by A345921/A345921.
- k even: counted by A081294, ranked by A053754/A053754.
- k odd: counted by A000302, ranked by A053738/A053738.

Programs

  • Magma
    [Binomial(2*n-1, n): n in [0..30]]; // Vincenzo Librandi, Aug 07 2014
  • Maple
    seq(binomial(2*n-1, n),n=0..24); # Peter Luschny, Sep 22 2014
  • Mathematica
    a[ n_] := SeriesCoefficient[(1 - x)^-n, {x, 0, n}];
    c = (1 - (1 - 4 x)^(1/2))/(2 x);CoefficientList[Series[1/(1-(c-1)),{x,0,20}],x] (* Geoffrey Critzer, Dec 02 2010 *)
    Table[Binomial[2 n - 1, n], {n, 0, 20}] (* Vincenzo Librandi, Aug 07 2014 *)
    a[ n_] := If[ n < 0, 0, With[ {m = 2 n}, m! SeriesCoefficient[ (1 + BesselI[0, 2 x]) / 2, {x, 0, m}]]]; (* Michael Somos, Nov 22 2014 *)
  • PARI
    {a(n) = sum( i=0, n, binomial(n+i-2,i))};
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( (1 + 1 / sqrt(1 - 4*x + x * O(x^n))) / 2, n))};
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( 1 / (1 - x + x * O(x^n))^n, n))};
    
  • PARI
    {a(n) = if( n<0, 0, binomial( 2*n - 1, n))};
    
  • PARI
    {a(n) = if( n<1, n==0, polcoeff( subst((1 - x) / (1 - 2*x), x, serreverse( x - x^2 + x * O(x^n))), n))};
    
  • Sage
    def A088218(n):
        return rising_factorial(n,n)/falling_factorial(n,n)
    [A088218(n) for n in (0..24)]  # Peter Luschny, Nov 21 2012
    

Formula

G.f.: (1 + 1 / sqrt(1 - 4*x)) / 2.
a(n) = binomial(2*n - 1, n).
a(n) = (n+1)*A000108(n)/2, n>=1. - B. Dubalski (dubalski(AT)atr.bydgoszcz.pl), Feb 05 2002 (in A060150)
a(n) = (0^n + C(2n, n))/2. - Paul Barry, May 21 2004
a(n) is the coefficient of x^n in 1 / (1 - x)^n and also the sum of the first n coefficients of 1 / (1 - x)^n. Given B(x) with the property that the coefficient of x^n in B(x)^n equals the sum of the first n coefficients of B(x)^n, then B(x) = B(0) / (1 - x).
G.f.: 1 / (2 - C(x)) = (1 - x*C(x))/sqrt(1-4*x) where C(x) is g.f. for Catalan numbers A000108. Second equation added by Wolfdieter Lang, Nov 22 2012.
From Paul Barry, Nov 02 2004: (Start)
a(n) = Sum_{k=0..n} binomial(2*n, k)*cos((n-k)*Pi);
a(n) = Sum_{k=0..n} binomial(n, (n-k)/2)*(1+(-1)^(n-k))*cos(k*Pi/2)/2 (with interpolated zeros);
a(n) = Sum_{k=0..floor(n/2)} binomial(n, k)*cos((n-2*k)*Pi/2) (with interpolated zeros); (End)
a(n) = A110556(n)*(-1)^n, central terms in triangle A110555. - Reinhard Zumkeller, Jul 27 2005
a(n) = Sum_{0<=k<=n} A094527(n,k)*(-1)^k. - Philippe Deléham, Mar 14 2007
From Paul Barry, Mar 29 2010: (Start)
G.f.: 1/(1-x/(1-2x/(1-(1/2)x/(1-(3/2)x/(1-(2/3)x/(1-(4/3)x/(1-(3/4)x/(1-(5/4)x/(1-... (continued fraction);
E.g.f.: (of aerated sequence) (1 + Bessel_I(0, 2*x))/2. (End)
a(n + 1) = A001700(n). a(n) = A024718(n) - A024718(n - 1).
E.g.f.: E(x) = 1+x/(G(0)-2*x) ; G(k) = (k+1)^2+2*x*(2*k+1)-2*x*(2*k+3)*((k+1)^2)/G(k+1); (continued fraction). - Sergei N. Gladkovskii, Dec 21 2011
a(n) = Sum_{k=0..n}(-1)^k*binomial(2*n,n+k). - Mircea Merca, Jan 28 2012
a(n) = rf(n,n)/ff(n,n), where rf is the rising factorial and ff the falling factorial. - Peter Luschny, Nov 21 2012
D-finite with recurrence: n*a(n) +2*(-2*n+1)*a(n-1) = 0. - R. J. Mathar, Dec 04 2012
a(n) = hypergeom([1-n,-n],[1],1). - Peter Luschny, Sep 22 2014
G.f.: 1 + x/W(0), where W(k) = 4*k+1 - (4*k+3)*x/(1 - (4*k+1)*x/(4*k+3 - (4*k+5)*x/(1 - (4*k+3)*x/W(k+1) ))) ; (continued fraction). - Sergei N. Gladkovskii, Nov 13 2014
a(n) = A000984(n) + A001791(n). - Gus Wiseman, Jun 28 2021
E.g.f.: (1 + exp(2*x) * BesselI(0,2*x)) / 2. - Ilya Gutkovskiy, Nov 03 2021
From Amiram Eldar, Mar 12 2023: (Start)
Sum_{n>=0} 1/a(n) = 5/3 + 4*Pi/(9*sqrt(3)).
Sum_{n>=0} (-1)^n/a(n) = 3/5 - 8*log(phi)/(5*sqrt(5)), where phi is the golden ratio (A001622). (End)
a(n) ~ 2^(2*n-1)/sqrt(n*Pi). - Stefano Spezia, Apr 17 2024

A014107 a(n) = n*(2*n-3).

Original entry on oeis.org

0, -1, 2, 9, 20, 35, 54, 77, 104, 135, 170, 209, 252, 299, 350, 405, 464, 527, 594, 665, 740, 819, 902, 989, 1080, 1175, 1274, 1377, 1484, 1595, 1710, 1829, 1952, 2079, 2210, 2345, 2484, 2627, 2774, 2925, 3080, 3239, 3402, 3569, 3740, 3915, 4094, 4277
Offset: 0

Views

Author

Keywords

Comments

Positive terms give a bisection of A000096. - Omar E. Pol, Dec 16 2016

Crossrefs

Programs

Formula

a(n) = A100345(n, n - 3) for n > 2.
a(n) = A033537(n) - 8*n^2; A100035(a(n)) = 2 for n > 1. - Reinhard Zumkeller, Oct 31 2004
a(n) = A014106(-n) for all n in Z. - Michael Somos, Nov 06 2005
From Michael Somos, Nov 06 2005: (Start)
G.f.: x*(-1 + 5*x)/(1 - x)^3.
E.g.f: x*(-1 + 2*x)*exp(x). (End)
a(n) = A097070(n)/A000108(n - 2), n >= 2. - Philippe Deléham, Apr 12 2007
a(n) = 2*a(n-1) - a(n-2) + 4, n > 1; a(0) = 0, a(1) = -1, a(2) = 2. - Zerinvary Lajos, Feb 18 2008
a(n) = a(n-1) + 4*n - 5 with a(0) = 0. - Vincenzo Librandi, Nov 20 2010
a(n) = (2*n-1)*(n-1) - 1. Also, with an initial offset of -1, a(n) = (2*n-1)*(n+1) = 2*n^2 + n - 1. - Alonso del Arte, Dec 15 2012
(a(n) + 1)^2 + (a(n) + 2)^2 + ... + (a(n) + n)^2 = (a(n) + n + 1)^2 + (a(n) + n + 2)^2 + ... + (a(n) + 2n - 1)^2 starting with a(1) = -1. - Jeffreylee R. Snow, Sep 17 2013
a(n) = A014105(n-1) - 1 for all n in Z. - Michael Somos, Nov 23 2021
From Amiram Eldar, Feb 20 2022: (Start)
Sum_{n>=1} 1/a(n) = -2*(1 - log(2))/3.
Sum_{n>=1} (-1)^n/a(n) = Pi/6 + log(2)/3 + 2/3. (End)
For n > 0, A002378(a(n)) = A000384(n-1)*A000384(n). - Charlie Marion, May 21 2023

A189911 Row sums of the extended Catalan triangle A189231.

Original entry on oeis.org

1, 2, 4, 9, 18, 40, 80, 175, 350, 756, 1512, 3234, 6468, 13728, 27456, 57915, 115830, 243100, 486200, 1016158, 2032316, 4232592, 8465184, 17577014, 35154028, 72804200, 145608400, 300874500, 601749000, 1240940160, 2481880320, 5109183315, 10218366630
Offset: 0

Views

Author

Peter Luschny, May 01 2011

Keywords

Crossrefs

Programs

  • Maple
    A189911 := proc(n) local a,b,d; if n = 0 then 1 else
    a := GAMMA(n-floor(n/2)); b := GAMMA(floor(n/2+3/2));
    d := GAMMA(floor(n/2+1))^2; GAMMA(n+1)*(a*b+d)/(a*b*d) fi end: seq(A189911(n),n=0..32);
    A189911 := proc(n) h:=irem(n,2); g:=iquo(n,2); (g+h+1)*binomial(2*g+h,g+h) end; # Peter Luschny, Oct 24 2013
  • Mathematica
    a[n_] := Module[{q, r}, {q, r} = QuotientRemainder[n, 2]; (q+r+1)*Pochhammer[q+1, q+r]/(q+r)!]; Table[a[n], {n, 0, 32}] (* Jean-François Alcover, Jan 09 2014 *)
  • Sage
    def A189911():
        r, n = 1, 1
        while True:
            yield r
            h = n//2
            r *= 2 if is_even(n) else (h+2)*(2*h+1)/(h+1)^2
            n += 1
    a = A189911(); [next(a) for i in range(16)]  # Peter Luschny, Oct 24 2013

Formula

Let a = Gamma(n-floor(n/2)), b = Gamma(floor(n/2+3/2)), d = Gamma( floor(n/2+1))^2, c = Gamma(n+1). Then a(n) = c*(a*b+d)/(a*b*d).
a(n) = A162246(n,n) + A162246(n,n+1) for n > 0.
From Peter Luschny, Oct 24 2013 : (Start)
E.g.f.: (x+1)*(BesselI(0, 2*x)+BesselI(1, 2*x)).
O.g.f.: I*(2*x^2-1)/(2*sqrt(2*x+1)*x*(2*x-1)^(3/2))-1/(2*x).
Recurrence: a(0) = 1; a(n) = a(n-1)*2 if n is even else ([n/2]+2)*(2*[n/2]+1)/([n/2]+1)^2. ([.] the floor brackets.)
a(n) = A056040(n) + A212303(n) = n$*(1+[(n+1)/2]^((-1)^n)), where n$ is the swinging factorial.
a(2*n) = (n+1)*C(2*n, n) (A037965);
a(2*n+1) = (n+2)*C(2*n+1, n+1) (A097070). (End)
Sum_{n>=0} 1/a(n) = 4*Pi/sqrt(3) - Pi^2/3 - 2. - Amiram Eldar, Aug 20 2022
D-finite with recurrence: (n-2)*(n+1)^2*a(n) - (2*(n-2)^2+2*n-12)*a(n-1) - 4*(n+2)*(n-1)^2*a(n-2) = 0. - Georg Fischer, Nov 25 2022

A371400 Triangle read by rows: T(n, k) = binomial(k + n, k)*binomial(2*n - k, n).

Original entry on oeis.org

1, 2, 2, 6, 9, 6, 20, 40, 40, 20, 70, 175, 225, 175, 70, 252, 756, 1176, 1176, 756, 252, 924, 3234, 5880, 7056, 5880, 3234, 924, 3432, 13728, 28512, 39600, 39600, 28512, 13728, 3432, 12870, 57915, 135135, 212355, 245025, 212355, 135135, 57915, 12870
Offset: 0

Views

Author

Peter Luschny, Mar 21 2024

Keywords

Comments

The main diagonal and column 0 of the triangle are the central binomial coefficients, which are the sums of the squares of Pascal's triangle entries. This sum representation can be generalized, and all terms can be seen as sums of coefficients of some polynomials. (See the Example section.)
To see this, consider T(n, k) as the value of the polynomials P(n, k)(x) at x = 1, where P(n, k)(x) = H([-n, -k], [1], x)*H([-n, -n + k], [1], x) and H denotes the hypergeometric sum 2F1. For instance column 0 is given by the row sums of A008459, and column 1 by the row sums of A371401.

Examples

			Triangle starts:
[0]    1;
[1]    2,     2;
[2]    6,     9,     6;
[3]   20,    40,    40,    20;
[4]   70,   175,   225,   175,    70;
[5]  252,   756,  1176,  1176,   756,   252;
[6]  924,  3234,  5880,  7056,  5880,  3234,   924;
[7] 3432, 13728, 28512, 39600, 39600, 28512, 13728, 3432;
.
Because of the symmetry, only the sum representation of terms with k <= n/2 are shown.
0:                 [1]
1:               [1+1]
2:             [1+4+1],               [1+4+4]
3:           [1+9+9+1],            [1+9+21+9]
4:      [1+16+36+16+1],       [1+16+66+76+16],        [1+16+76+96+36]
5: [1+25+100+100+25+1], [1+25+160+340+205+25], [1+25+190+460+400+100]
		

Crossrefs

Column 0 and main diagonal are A000984.
Column 1 and subdiagonal are A097070.
Row sums are A045721.
The even bisection of the alternating row sums is A005809.
The central terms are A188662.

Programs

  • Maple
    T := (n, k) -> binomial(k + n, k) * binomial(2*n - k, n):
    seq(print(seq(T(n, k), k = 0..n)), n = 0..8);
  • Mathematica
    T[n_, k_] := Hypergeometric2F1[-n, -k, 1, 1] Hypergeometric2F1[-n, -n +k, 1, 1];
    Table[T[n, k], {n, 0, 7}, {k, 0, n}]

Formula

T(n, k) = A046899(n, k) * A092392(n, k).
T(n, k) = A046899(n, k) * A046899(n, n - k).
T(n, k) = A092392(n, k) * A092392(n, n - k).
T(n, k) = A371395(n, k) * (n + 1).
T(n, k) = hypergeom([-n, -k], [1], 1) * hypergeom([-n, -n + k], [1], 1).
2^n*Sum_{k=0..n} T(n, k)*(1/2)^k = A244038(n).
2^n*Sum_{k=0..n} T(n, k)*(-1/2)^k = A371399(n).

A275329 a(n) = (2+[n/2])*n!/((1+[n/2])*[n/2]!^2).

Original entry on oeis.org

2, 2, 3, 9, 8, 40, 25, 175, 84, 756, 294, 3234, 1056, 13728, 3861, 57915, 14300, 243100, 53482, 1016158, 201552, 4232592, 764218, 17577014, 2912168, 72804200, 11143500, 300874500, 42791040, 1240940160, 164812365, 5109183315, 636438060, 21002455980, 2463251010
Offset: 0

Views

Author

Peter Luschny, Sep 10 2016

Keywords

Crossrefs

Programs

  • Maple
    a := n -> (2+iquo(n,2))*n!/((1+iquo(n,2))*iquo(n, 2)!^2):
    seq(a(n), n=0..34);
  • Sage
    def A275329():
        x, n, k = 1, 1, 2
        while True:
            yield x * k
            if is_odd(n):
                x *= n
            else:
                k += 1
                x = (x<<2)//(n+2)
            n += 1
    a = A275329(); print([next(a) for _ in range(37)])

Formula

a(n) = A056040(n)*(2+[n/2])/(1+[n/2]).
a(n) = A057977(n)*A008619(n+2).
a(2*n+1) = (n+2)*binomial(2*n+1, n+1) = A189911(2*n+1).
a(2*n-3) = n*binomial(2*n-3, n-1) = A097070(n) for n>=2.
a(2*n+2) = (n+3)*binomial(2*n+2, n+1)/(n+2) = A038665(n).
Sum_{n>=0} 1/a(n) = 16/3 - 40*Pi/(9*sqrt(3)) + 4*Pi^2/9. - Amiram Eldar, Aug 20 2022

A371401 Triangle read by rows: T(n, k) = [x^k] (n*x + 1)*Hypergeometric([-n, -n + 1], [1], x).

Original entry on oeis.org

1, 1, 1, 1, 4, 4, 1, 9, 21, 9, 1, 16, 66, 76, 16, 1, 25, 160, 340, 205, 25, 1, 36, 330, 1100, 1275, 456, 36, 1, 49, 609, 2905, 5425, 3801, 889, 49, 1, 64, 1036, 6664, 18130, 20776, 9604, 1576, 64, 1, 81, 1656, 13776, 51156, 86436, 65856, 21456, 2601, 81
Offset: 0

Views

Author

Peter Luschny, Mar 22 2024

Keywords

Examples

			Triangle starts:
[0] 1;
[1] 1,  1;
[2] 1,  4,    4;
[3] 1,  9,   21,    9;
[4] 1, 16,   66,   76,    16;
[5] 1, 25,  160,  340,   205,    25;
[6] 1, 36,  330, 1100,  1275,   456,   36;
[7] 1, 49,  609, 2905,  5425,  3801,  889,   49;
[8] 1, 64, 1036, 6664, 18130, 20776, 9604, 1576, 64;
		

Crossrefs

Cf. A371400, A097070 (row sums, shifted).

Programs

  • Maple
    P := (n, x) -> (n*x + 1)*hypergeom([-n, -n + 1], [1], x):
    T := (n, k) -> coeff(simplify(P(n, x)), x, k):
    seq(seq(T(n, k), k = 0..n), n = 0..9);

Formula

Sum_{k=0..n} a(n) = (n + 1)*binomial(2*n - 1, n).
Showing 1-6 of 6 results.