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

A007889 Number of intransitive (or alternating, or Stanley) trees: vertices are [0,n] and for no i

Original entry on oeis.org

1, 1, 2, 7, 36, 246, 2104, 21652, 260720, 3598120, 56010096, 971055240, 18558391936, 387665694976, 8787898861568, 214868401724416, 5636819806209792, 157935254554567296, 4707152127520549120, 148704074888134683520, 4963548160096887021056, 174553183413968718996736
Offset: 0

Views

Author

Alexander Postnikov [ apost(AT)math.mit.edu ]

Keywords

Comments

Number of local binary search trees (i.e. labeled binary trees such that every left child has a smaller label than its parent and every right child has a larger label than its parent) on n vertices. Example: a(3)=7 because we have 3L2L1, 2L1R3, 3L1R2, 1R2R3, 1R3L2, 2R3L1 (Li means left child labeled i, RI means right child labeled i) and root 2 with left child 1 and right child 3. - Emeric Deutsch, Nov 24 2004
Number of regions of the Linial arrangement. - Ira M. Gessel, Nov 01 2023

References

  • I. M. Gelfand, M. I. Graev and A. Postnikov, Combinatorics of hypergeometric functions associated with positive roots, in Arnold-Gelfand Mathematical Seminars: Geometry and Singularity Theory, Birkhäuser, 1997.
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 5.41(a).

Crossrefs

Row sums of A029847.

Programs

  • Maple
    f:= n->1/(2^n*(n+1))*add(binomial(n+1, k)*k^n, k=1..(n+1)): seq(f(n), n=0..19);
  • Mathematica
    With[{nn=20},CoefficientList[Series[-2/x LambertW[-1/2x Exp[x/2]], {x,0,nn}], x]Range[0,nn]!] (* Harvey P. Dale, Aug 12 2011 *)
    Table[1/((n+1)2^n) Sum[Binomial[n+1,k]k^n,{k,n+1}],{n,0,20}] (* Harvey P. Dale, Apr 21 2012 *)
  • PARI
    {a(n)=local(A=1+x);for(i=0,n,A=exp(x*(1+A)/2 +x*O(x^n)));n!*polcoeff(A,n)} \\ Paul D. Hanna, Mar 29 2008
    
  • PARI
    /* Coefficients of A(x)^p are given by: */ {a(n,p=1)=(1/2^n)*sum(k=0,n,binomial(n,k)*p*(k+p)^(n-1))} \\ Vladeta Jovovic and Paul D. Hanna, Apr 03 2008
    
  • Sage
    def A007889(n) : return add(binomial(n,k)*(k+1)^(n-1) for k in (0..n))/2^n
    for n in (0..19) : print(A007889(n)) # Peter Luschny, Feb 29 2012

Formula

a(n) = (1/((n+1)*2^n))*Sum_{k=1..n+1} C(n+1,k)*k^n.
E.g.f. A(x) satisfies: A(x) = exp( x*(1 + A(x))/2 ). E.g.f. A(x) equals the inverse function of 2*log(x)/(1+x). - Paul D. Hanna, Mar 29 2008
E.g.f.: -2/x*LambertW(-1/2*x*exp(1/2*x)). - Vladeta Jovovic, Mar 29 2008
From Vladeta Jovovic and Paul D. Hanna, Apr 03 2008: (Start)
Powers of e.g.f.: If A(x)^p = Sum_{n>=0} a(n,p)*x^n/n! then a(n,p) = (1/2^n)* Sum_{k=0..n} binomial(n,k)*p*(k+p)^(n-1).
Let A(x) = e.g.f. of A007889, B(x) = e.g.f. of A138860 where B(x) = exp( x*[B(x) + B(x)^2]/2 ); then B(x) = A(x*B(x)) = (1/x)*Series_Reversion(x/A(x)) and A(x) = B(x/A(x)) = x/Series_Reversion(x*B(x)). (End)
For n>=2, a(n)=Sum_{1,...,floor(n/2)}binomial(n-1, 2k-1)*k^(n-2). [Vladimir Shevelev, Mar 21 2010]
For n>0, a(n) = A088789(n+1)*2/(n+1). [Vaclav Kotesovec, Dec 26 2011]

A135922 Inverse binomial transform of A006116, which is the sum of Gaussian binomial coefficients [n,k] for q=2.

Original entry on oeis.org

1, 1, 2, 6, 26, 158, 1330, 15414, 245578, 5382862, 162700898, 6801417318, 394502066810, 31849226170622, 3589334331706258, 566102993389615254, 125225331231990004138, 38920655753545108286254, 17021548688670112527781058, 10486973328106497739526535366
Offset: 0

Views

Author

Paul D. Hanna, Dec 06 2007

Keywords

Comments

Let B = {v_1,v_2,...,v_n} be a basis for F_2^n. a(n) is the number of subspaces of F_2^n that do not contain any of the vectors in B. Moreover, for 1<=k<=n, let S be a size k subset of B. a(k) is the number of subspaces of F_2^n that do not contain any of the vectors in S but do contain all the vectors in B - S. - Geoffrey Critzer, May 03 2025
Also number of Stanley graphs on n nodes. For precise definition see Knuth (1997). - Alois P. Heinz, Sep 24 2019
Also the number of naturally labeled posets on [n] with height at most two. - David Bevan, Jul 28 2022; Nov 16 2023
Also the number of sign mappings X:([n] choose 2) -> {+,-} such that for any ordered 3-tuple aManfred Scheucher, Jan 05 2024

Examples

			O.g.f.: A(x) = 1 + x/(1-x) + x^2/((1-x)*(1-3x)) + x^3/((1-x)*(1-3x)*(1-7x)) + x^4/((1-x)*(1-3x)*(1-7x)*(1-15x)) + ...
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, p. 318.

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; add(mul(
          (2^(i+k)-1)/(2^i-1), i=1..n-k), k=0..n)
        end:
    a:= proc(n) option remember;
          add(b(n-j)*binomial(n,j)*(-1)^j, j=0..n)
        end:
    seq(a(n), n=0..19);  # Alois P. Heinz, Sep 24 2019
  • Mathematica
    Table[SeriesCoefficient[Sum[x^n/Product[(1-(2^k-1)*x),{k,0,n}],{n,0,nn}],{x,0,nn}] ,{nn,0,20}] (* Vaclav Kotesovec, Aug 23 2013 *)
    b[n_] := b[n] = Sum[Product[(2^(i+k)-1)/(2^i-1), {i, 1, n-k}], {k, 0, n}];
    a[n_] := a[n] = Sum[(-1)^j b[n-j] Binomial[n, j], {j, 0, n}];
    a /@ Range[0, 19] (* Jean-François Alcover, Mar 10 2020, after Alois P. Heinz *)
  • PARI
    a(n)=polcoeff(sum(k=0, n, x^k/prod(j=0, k, 1-(2^j-1)*x+x*O(x^n))), n)
    
  • Sage
    # After Vladimir Kruchinin.
    def a(n):
        @cached_function
        def T(n, k):
            if k == 1 or k == n: return 1
            return (2^k-1)*T(n-1, k) + T(n-1, k-1)
        return sum(T(n, k) for k in (1..n)) if n > 0 else 1
    print([a(n) for n in (0..19)]) # Peter Luschny, Feb 26 2020

Formula

O.g.f.: A(x) = Sum_{n>=0} x^n / Product_{k=0..n} (1 - (2^k-1)*x).
G.f.: (G(0) - 1)/(x-1) where G(k) = 1 - 1/(1-x*(2^k-1))/(1-x/(x-1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jan 16 2013
a(n) ~ c * 2^(n^2/4), where c = EllipticTheta[3,0,1/2]/QPochhammer[1/2,1/2] = 7.3719688014613... if n is even and c = EllipticTheta[2,0,1/2]/QPochhammer[1/2,1/2] = 7.3719494907662... if n is odd. - Vaclav Kotesovec, Aug 23 2013
a(n) = Sum_{k=0..n} qStirling2(n,k), where qStirling2 is the triangle A139382. - Vladimir Kruchinin, Feb 26 2020
G.f.: f(1), where f(y) = 1 + x*((y-1)*f(y) + f(2*y)). - David Bevan, Jul 28 2022
E.g.f.: exp(-x)*g(x) where g(x) is the e.g.f. for A006116. (given in D. E. Knuth link) - Geoffrey Critzer, May 03 2025

Extensions

References for Stanley graphs added by David Bevan, Jul 24 2024

A323842 Number of n-node Stanley graphs without isolated nodes.

Original entry on oeis.org

1, 0, 1, 2, 11, 72, 677, 8686, 152191, 3632916, 118317913, 5271781946, 322549557299, 27208234437984, 3177021912874253, 515436469519284358, 116581257420399219175, 36866447823471507563436, 16339685138335030408029889, 10170100145132835334268145362
Offset: 0

Views

Author

N. J. A. Sloane, Feb 04 2019

Keywords

Comments

For precise definition see Knuth (1997).
Also, the number of naturally labeled posets on [n] with height at most two and no isolated elements. - David Bevan, Nov 17 2023

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; add(mul(
          (2^(i+k)-1)/(2^i-1), i=1..n-k), k=0..n)
        end:
    g:= proc(n) option remember;
          add(b(n-j)*binomial(n, j)*(-1)^j, j=0..n)
        end:
    a:= proc(n) option remember;
          add(g(n-j)*binomial(n, j)*(-1)^j, j=0..n)
        end:
    seq(a(n), n=0..21);  # Alois P. Heinz, Sep 24 2019
  • Mathematica
    b[n_] := b[n] = Sum[Product[(2^(i+k) - 1)/(2^i - 1), {i, n-k}], {k, 0, n}];
    g[n_] := g[n] = Sum[b[n-j] Binomial[n, j] (-1)^j, {j, 0, n}];
    a[n_] := a[n] = Sum[g[n-j] Binomial[n, j] (-1)^j, {j, 0, n}];
    a /@ Range[0, 21] (* Jean-François Alcover, May 24 2020, after Alois P. Heinz *)
  • Maxima
    P(n, k, x):=if k<0 or n<0 then 0 else if k=0 then 1 else x*P(n, k-1, x)+
    2^k*P(n-1, k, (x+1)/2);
    a(n):=sum(P(n-k, k, -1), k, 0, n);
    makelist(a(n), n, 0, 10);
    /* Vladimir Kruchinin, Mar 08 2020 */

Formula

a(n) = Sum_{j=0..n} (-1)^j * C(n,j) * A135922(n-j). - Alois P. Heinz, Sep 24 2019
a(n) = Sum_{k=0..n} P(n-k, k, -1), where P(n, k, x) = x*P(n, k-1, x) + 2^k*P(n-1, k, (x+1)/2). - Vladimir Kruchinin, Mar 09 2020
G.f.: g(1,0), where g(u,v) = 1 + x*((v-1)*g(u,v) + g(2*u,u+v)). - David Bevan, Jul 28 2022
G.f.: 1/(1+z) * Sum_{k>=0} (z^k / Prod_{i=2..k} (1 - (2^i-2)*z)). - David Bevan, Nov 17 2023; simplified on Jul 25 2024

Extensions

More terms from Alois P. Heinz, Sep 24 2019

A323843 Number of n-node connected Stanley graphs.

Original entry on oeis.org

0, 1, 1, 2, 8, 52, 502, 6824, 127166, 3205924, 108975934, 5006366048, 312601245662, 26708244267148, 3142852107059758, 512229404374936616, 116165284523764481294, 36791597841822774872116, 16320947226945992981680606, 10163558457757761048966068912
Offset: 0

Views

Author

N. J. A. Sloane, Feb 04 2019

Keywords

Comments

For precise definition see Knuth (1997).

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; add(mul(
          (2^(i+k)-1)/(2^i-1), i=1..n-k), k=0..n)
        end:
    p:= proc(n) option remember;
          add(b(n-j)*binomial(n, j)*(-1)^j, j=0..n)
        end:
    a:= proc(n) option remember; `if`(n=0, 0, p(n)-add(
          binomial(n, j)*p(n-j)*a(j)*j, j=1..n-1)/n)
        end:
    seq(a(n), n=0..21);  # Alois P. Heinz, Sep 24 2019
  • Mathematica
    b[n_] := b[n] = Sum[Product[(2^(i+k) - 1)/(2^i - 1), {i, n-k}], {k, 0, n}];
    p[n_] := p[n] = Sum[b[n-j] Binomial[n, j] (-1)^j, {j, 0, n}];
    a[n_] := a[n] = If[n == 0, 0, p[n] - Sum[Binomial[n, j] p[n-j] a[j] j, {j, n-1}]/n];
    a /@ Range[0, 21] (* Jean-François Alcover, May 24 2020, after Alois P. Heinz *)

Extensions

More terms from Alois P. Heinz, Sep 24 2019

A029847 Gessel-Stanley triangle read by rows: triangle of coefficients of polynomials arising in connection with enumeration of intransitive trees by number of nodes and number of right nodes.

Original entry on oeis.org

1, 1, 1, 1, 1, 5, 1, 1, 17, 17, 1, 1, 49, 146, 49, 1, 1, 129, 922, 922, 129, 1, 1, 321, 4887, 11234, 4887, 321, 1, 1, 769, 23151, 106439, 106439, 23151, 769, 1, 1, 1793, 101488, 856031, 1679494, 856031, 101488, 1793, 1, 1, 4097, 420512, 6137832, 21442606, 21442606, 6137832, 420512, 4097, 1
Offset: 0

Views

Author

Keywords

Comments

For precise definition see Knuth (1997).
Named after the American mathematicians Ira Martin Gessel (b. 1951) and Richard Peter Stanley (b. 1944). - Amiram Eldar, Jun 11 2021

Examples

			Triangle begins:
  1;
  .   1;
  .   1,   1;
  .   1,   5,   1;
  .   1,  17,  17,   1;
  .   1,  49, 146,  49,   1;
  .   1, 129, 922, 922, 129, 1;
  .   ...
		

Crossrefs

Row sums give A007889.

Programs

  • Maple
    f:= proc(n,k) option remember; `if`(k<0, 0, `if`(n=0
          and k=0, 1, f(n-1,k-1)+add(add(binomial(n-1, l)
          *s*f(l,s)*f(n-l-1,k-s), s=1..l), l=1..n-1)))
        end:
    seq(seq(f(n, k), k=min(n, 1)..n), n=0..10); # Alois P. Heinz, Sep 24 2019
  • Mathematica
    f[n_, k_] := f[n, k] = If[k<0, 0, If[n==0 && k==0, 1, f[n-1, k-1]+Sum[Sum[ Binomial[n-1, l]*s*f[l, s]*f[n-l-1, k-s], {s, 1, l}], {l, 1, n-1}]]];
    Table[Table[f[n, k], {k, Min[n, 1], n}], {n, 0, 10}] // Flatten (* Jean-François Alcover, Feb 14 2021, after Alois P. Heinz *)

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 23 2003

A329154 Coefficients of polynomials related to the sum of Gaussian binomial coefficients for q = 2. Triangle read by rows, T(n,k) for 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 6, 6, 3, 1, 26, 24, 12, 4, 1, 158, 130, 60, 20, 5, 1, 1330, 948, 390, 120, 30, 6, 1, 15414, 9310, 3318, 910, 210, 42, 7, 1, 245578, 123312, 37240, 8848, 1820, 336, 56, 8, 1, 5382862, 2210202, 554904, 111720, 19908, 3276, 504, 72, 9, 1
Offset: 0

Views

Author

Keywords

Comments

T(n,k) is the number of n X n matrices over F_2 in reduced row echelon form having exactly k zero-columns. Equivalently, T(n,k) is the number of subspaces of F_2^n that "involve" n-k coordinates. (For the definition of "involve" see the link below: D. E. Knuth, Letter to Daniel Ullman and others). - Geoffrey Critzer, May 03 2025

Examples

			Triangle starts:
[0] [1]
[1] [1,       1]
[2] [2,       2,       1]
[3] [6,       6,       3,      1]
[4] [26,      24,      12,     4,      1]
[5] [158,     130,     60,     20,     5,     1]
[6] [1330,    948,     390,    120,    30,    6,    1]
[7] [15414,   9310,    3318,   910,    210,   42,   7,   1]
[8] [245578,  123312,  37240,  8848,   1820,  336,  56,  8,  1]
[9] [5382862, 2210202, 554904, 111720, 19908, 3276, 504, 72, 9, 1]
		

Crossrefs

Row sums: A006116, first column: A135922.

Programs

  • Maple
    T := (n, k) -> local j, m; pochhammer(n - k + 1, k)*add((-1)^j*add(product((2^(i + m) - 1)/(2^i - 1), i = 1..n-k-m-j), m = 0..n-k-j)*binomial(n - k, j), j = 0..n-k) / k!: for n from 0 to 9 do seq(T(n,k), k=0..n) od;  # Peter Luschny, Oct 08 2023
  • Mathematica
    T[n_,k_]:= (Pochhammer[n-k+1,k]/(k!)*Sum[(-1)^j*Sum[Product[(2^(i+m)-1)/(2^i-1),{i,1,n-k-m-j}],{m,0,n-k-j}]*Binomial[n-k,j],{j,0,n-k}]); Flatten[Table[T[n,k],{n,0,9},{k,0,n}]] (* Detlef Meya, Oct 07 2023 *)
  • Sage
    R = PolynomialRing(QQ, 'x')
    x = R.gen()
    @cached_function
    def P(n, k, x):
        if k < 0 or n < 0: return R(0)
        if k == 0: return R(1)
        return x*P(n, k-1, x) + 2^k*P(n-1, k, (x+1)/2)
    def row(n): return sum(P(n-k, k, x) for k in range(n+1)).coefficients()
    print(flatten([row(n) for n in range(10)]))

Formula

Let P(n, k, x) = x*P(n, k-1, x) + 2^k*P(n-1, k, (x+1)/2) and Q(n, x) = Sum_{k=0..n} P(n-k, k, x) then T(n, k) = [x^k] Q(n, x).
T(n, k) = (1/k!) * Pochhammer(n-k+1, k) * Sum_{j=0..n-k}((-1)^j*Sum_{m=0..n-k-j} (Product_{i=1..n-k-m-j} ((2^(i+m)-1)/(2^i-1))) * binomial(n-k, j)). - Detlef Meya, Oct 07 2023
T(n,k) = binomial(n,k)*A135922(n-k). (see Stanley-Locke link above) - Geoffrey Critzer, May 03 2025
E.g.f.: exp(y x)*f(x) where f(x) is the e.g.f. for A135922. - Geoffrey Critzer, May 03 2025

A383655 Triangle read by rows: T(n,k) is the number of n-node Stanley graphs containing exactly k isolated points, n>=0, 0<=k<=n.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 2, 3, 0, 1, 11, 8, 6, 0, 1, 72, 55, 20, 10, 0, 1, 677, 432, 165, 40, 15, 0, 1, 8686, 4739, 1512, 385, 70, 21, 0, 1, 152191, 69488, 18956, 4032, 770, 112, 28, 0, 1, 3632916, 1369719, 312696, 56868, 9072, 1386, 168, 36, 0, 1, 118317913, 36329160, 6848595, 1042320, 142170, 18144, 2310, 240, 45, 0, 1
Offset: 0

Views

Author

Geoffrey Critzer, May 04 2025

Keywords

Comments

For precise definition see the links: David Bevan and others (2023) or D.E. Knuth (1997).

Examples

			Triangle T(n,k) begins:
   1;
   0,  1;
   1,  0,  1;
   2,  3,  0,  1;
  11,  8,  6,  0, 1;
  72, 55, 20, 10, 0, 1;
  ...
		

Crossrefs

Cf. A323842 (column k=0), A135922 (row sums).

Programs

  • Mathematica
    nn = 10; g[x_] :=Total[Table[Sum[QBinomial[n, k, 2] x^n/n!, {k, 0, n}], {n, 0, nn}]]; Table[(Range[0, nn]! CoefficientList[Series[Exp[y x] Exp[-x] g[x] Exp[-x], {x, 0, nn}], {x, y}])[[i, 1 ;; i]], {i, 1, nn + 1}] // Grid

Formula

E.g.f.: exp((y-1)*x)*f(x) where f(x) is the e.g.f. for A135922.

A383656 Triangular array read by rows: T(n,k) is the number of n-node Stanley graphs containing exactly k connected components, n>=0, 0<=k<=n.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 2, 3, 1, 0, 8, 11, 6, 1, 0, 52, 60, 35, 10, 1, 0, 502, 472, 255, 85, 15, 1, 0, 6824, 5166, 2422, 805, 175, 21, 1, 0, 127166, 76712, 30072, 9177, 2100, 322, 28, 1, 0, 3205924, 1526910, 486800, 129360, 28497, 4788, 546, 36, 1, 0, 108975934, 40603534, 10292970, 2285240, 455805, 76629, 9870, 870, 45, 1
Offset: 0

Views

Author

Geoffrey Critzer, May 04 2025

Keywords

Comments

For precise definition see the links: David Bevan and others (2023) or D.E. Knuth (1997).

Examples

			Triangle begins:
 1;
 0, 1;
 0, 1, 1;
 0, 2, 3, 1;
 0, 8, 11, 6, 1;
 0, 52, 60, 35, 10, 1;
 0, 502, 472, 255, 85, 15, 1;
 ...
		

Crossrefs

Cf. A323843 (column k=1), A135922 (row sums).

Programs

  • Mathematica
    nn = 8; Prepend[Table[(Range[0, nn]! CoefficientList[Series[(Exp[-x] g[x])^y, {x, 0, nn}], {x, y}])[[i,1 ;; i]], {i, 2, nn + 1}], {1}] // Grid

Formula

E.g.f.: f(x)^y where f(x) is the e.g.f. for A135922.
Showing 1-8 of 8 results.