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-10 of 15 results. Next

A003024 Number of acyclic digraphs (or DAGs) with n labeled nodes.

Original entry on oeis.org

1, 1, 3, 25, 543, 29281, 3781503, 1138779265, 783702329343, 1213442454842881, 4175098976430598143, 31603459396418917607425, 521939651343829405020504063, 18676600744432035186664816926721, 1439428141044398334941790719839535103, 237725265553410354992180218286376719253505
Offset: 0

Views

Author

Keywords

Comments

Also the number of n X n real (0,1)-matrices with all eigenvalues positive. - Conjectured by Eric W. Weisstein, Jul 10 2003 and proved by McKay et al. 2003, 2004
Also the number of n X n real (0,1)-matrices with permanent equal to 1, up to permutation of rows/columns, cf. A089482. - Vladeta Jovovic, Oct 28 2009
Also the number of nilpotent elements in the semigroup of binary relations on [n]. - Geoffrey Critzer, May 26 2022
From Gus Wiseman, Jan 01 2024: (Start)
Also the number of sets of n nonempty subsets of {1..n} such that there is a unique way to choose a different element from each. For example, non-isomorphic representatives of the a(3) = 25 set-systems are:
{{1},{2},{3}}
{{1},{2},{1,3}}
{{1},{2},{1,2,3}}
{{1},{1,2},{1,3}}
{{1},{1,2},{2,3}}
{{1},{1,2},{1,2,3}}
These set-systems have ranks A367908, subset of A367906, for multisets A368101.
The version for no ways is A368600, any length A367903, ranks A367907.
The version for at least one way is A368601, any length A367902.
(End)

Examples

			For n = 2 the three (0,1)-matrices are {{{1, 0}, {0, 1}}, {{1, 0}, {1, 1}}, {{1, 1}, {0, 1}}}.
		

References

  • Archer, K., Gessel, I. M., Graves, C., & Liang, X. (2020). Counting acyclic and strong digraphs by descents. Discrete Mathematics, 343(11), 112041.
  • S. R. Finch, Mathematical Constants, Cambridge, 2003, p. 310.
  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, p. 19, Eq. (1.6.1).
  • R. W. Robinson, Counting labeled acyclic digraphs, pp. 239-273 of F. Harary, editor, New Directions in the Theory of Graphs. Academic Press, NY, 1973.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • R. P Stanley, Enumerative Combinatorics I, 2nd. ed., p. 322.

Crossrefs

Cf. A086510, A081064 (refined by # arcs), A307049 (by # descents).
Cf. A055165, which counts nonsingular {0, 1} matrices and A085656, which counts positive definite {0, 1} matrices.
Cf. A188457, A135079, A137435 (acyclic 3-multidigraphs), A188490.
For a unique sink we have A003025.
The unlabeled version is A003087.
These are the reverse-alternating sums of rows of A046860.
The weakly connected case is A082402.
A reciprocal version is A334282.
Row sums of A361718.

Programs

  • Maple
    p:=evalf(solve(sum((-1)^n*x^n/(n!*2^(n*(n-1)/2)), n=0..infinity) = 0, x), 50); M:=evalf(sum((-1)^(n+1)*p^n/((n-1)!*2^(n*(n-1)/2)), n=1..infinity), 40); # program for evaluation of constants p and M in the asymptotic formula, Vaclav Kotesovec, Dec 09 2013
  • Mathematica
    a[0] = a[1] = 1; a[n_] := a[n] = Sum[ -(-1)^k * Binomial[n, k] * 2^(k*(n-k)) * a[n-k], {k, 1, n}]; Table[a[n], {n, 0, 13}](* Jean-François Alcover, May 21 2012, after PARI *)
    Table[2^(n*(n-1)/2)*n! * SeriesCoefficient[1/Sum[(-1)^k*x^k/k!/2^(k*(k-1)/2),{k,0,n}],{x,0,n}],{n,0,20}] (* Vaclav Kotesovec, May 19 2015 *)
    Table[Length[Select[Subsets[Subsets[Range[n]],{n}],Length[Select[Tuples[#],UnsameQ@@#&]]==1&]],{n,0,5}] (* Gus Wiseman, Jan 01 2024 *)
  • PARI
    a(n)=if(n<1,n==0,sum(k=1,n,-(-1)^k*binomial(n,k)*2^(k*(n-k))*a(n-k)))
    
  • PARI
    {a(n)=polcoeff(1-sum(k=0, n-1, a(k)*x^k/(1+2^k*x+x*O(x^n))^(k+1)), n)} \\ Paul D. Hanna, Oct 17 2009

Formula

a(0) = 1; for n > 0, a(n) = Sum_{k=1..n} (-1)^(k+1)*C(n, k)*2^(k*(n-k))*a(n-k).
1 = Sum_{n>=0} a(n)*exp(-2^n*x)*x^n/n!. - Vladeta Jovovic, Jun 05 2005
a(n) = Sum_{k=1..n} (-1)^(n-k)*A046860(n,k) = Sum_{k=1..n} (-1)^(n-k)*k!*A058843(n,k). - Vladeta Jovovic, Jun 20 2008
1 = Sum_{n=>0} a(n)*x^n/(1 + 2^n*x)^(n+1). - Paul D. Hanna, Oct 17 2009
1 = Sum_{n>=0} a(n)*C(n+m-1,n)*x^n/(1 + 2^n*x)^(n+m) for m>=1. - Paul D. Hanna, Apr 01 2011
log(1+x) = Sum_{n>=1} a(n)*(x^n/n)/(1 + 2^n*x)^n. - Paul D. Hanna, Apr 01 2011
Let E(x) = Sum_{n >= 0} x^n/(n!*2^C(n,2)). Then a generating function for this sequence is 1/E(-x) = Sum_{n >= 0} a(n)*x^n/(n!*2^C(n,2)) = 1 + x + 3*x^2/(2!*2) + 25*x^3/(3!*2^3) + 543*x^4/(4!*2^6) + ... (Stanley). Cf. A188457. - Peter Bala, Apr 01 2013
a(n) ~ n!*2^(n*(n-1)/2)/(M*p^n), where p = 1.488078545599710294656246... is the root of the equation Sum_{n>=0} (-1)^n*p^n/(n!*2^(n*(n-1)/2)) = 0, and M = Sum_{n>=1} (-1)^(n+1)*p^n/((n-1)!*2^(n*(n-1)/2)) = 0.57436237330931147691667... Both references to the article "Acyclic digraphs and eigenvalues of (0,1)-matrices" give the wrong value M=0.474! - Vaclav Kotesovec, Dec 09 2013 [Response from N. J. A. Sloane, Dec 11 2013: The value 0.474 has a typo, it should have been 0.574. The value was taken from Stanley's 1973 paper.]
exp( Sum_{n >= 1} a(n)*x^n/n ) = 1 + x + 2*x^2 + 10*x^3 + 146*x^4 + 6010*x^5 + ... appears to have integer coefficients (cf. A188490). - Peter Bala, Jan 14 2016

A058877 Number of labeled acyclic digraphs with n nodes containing exactly n-1 points of in-degree zero.

Original entry on oeis.org

0, 2, 9, 28, 75, 186, 441, 1016, 2295, 5110, 11253, 24564, 53235, 114674, 245745, 524272, 1114095, 2359278, 4980717, 10485740, 22020075, 46137322, 96468969, 201326568, 419430375, 872415206, 1811939301, 3758096356, 7784628195, 16106127330, 33285996513
Offset: 1

Views

Author

N. J. A. Sloane, Jan 07 2001

Keywords

Comments

Convolution of 2^n+1 (A000051) and 2^n-1 (A000225). - Graeme McRae, Jun 07 2006
Let Q be a binary relation on the power set P(A) of a set A having n = |A| elements such that for all nonempty elements x,y of P(A), xRy if x is a proper subset of y and there are no z in P(A) such that x is a proper subset of z and z is a proper subset of y. Then a(n) = |Q|. - Ross La Haye, Feb 20 2008, Oct 21 2008
Also: convolution of A006589 with A000012 (i.e., partial sums of A006589). - R. J. Mathar, Jan 25 2009
The La Haye binary relation Q is more clearly stated as x is nonempty and y has one more element than x. If x is a k-set than the number of such pairs is binomial( n, k) * (n-k). - Michael Somos, Mar 29 2012
Select one of the n nodes of the digraph and select a nonempty subset of the rest to connect to the selected node. This can be done in n * (2^(n-1) - 1) ways. - Michael Somos, Mar 29 2012
Column 1 of A198204. - Peter Bala, Aug 01 2012
a(n) is the number of ternary sequences of length n that contain one 0 and at least one 1. For example, a(3)=9 since the sequences are the 3 permutations of 011 and the 6 permutations of 012. - Enrique Navarrete, Apr 05 2021
a(n) is also the number of multiplications required to compute the permanent of general n X n matrices using canonical trellis method (see Theorem 5, p. 10 in Kiah et al.). - Stefano Spezia, Nov 02 2021

Examples

			G.f. = 2*x^2 + 9*x^3 + 28*x^4 + 75*x^5 + 186*x^6 + 441*x^7 + 1016*x^8 + ...
		

References

  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, p. 19, (1.6.4).
  • Gerta Rucker and Christoph Rucker, "Walk counts, Labyrinthicity and complexity of acyclic and cyclic graphs and molecules", J. Chem. Inf. Comput. Sci., 40 (2000), 99-106. See Table 1 on page 101. [From Parthasarathy Nambi, Sep 26 2008]

Crossrefs

Second column of A058876. Cf. A003025, A003026.
Column k=1 of A133399.
Cf. A198204.

Programs

Formula

a(n+1) = (n+1)*2^n - n - 1 = Sum_{j=0..n} (n+j)*2^(n-j-1) = A048493(n)-1 = Column sum of A062111. - Henry Bottomley, May 30 2001
From R. J. Mathar, Jan 25 2009: (Start)
G.f.: x^2*(2-3*x)/((1-2*x)*(1-x))^2.
a(n) = 6*a(n-1) - 13*a(n-2) + 12*a(n-3) - 4*a(n-4). (End)
a(n) = Sum_{k=1..n-1} binomial(n, k) * (n-k). - Michael Somos, Mar 29 2012
E.g.f: x*exp(x)*(exp(x)-1). - Enrique Navarrete, Apr 05 2021

Extensions

More terms from Vladeta Jovovic, Apr 10 2001

A368600 Number of ways to choose a set of n nonempty subsets of {1..n} such that it is not possible to choose a different element from each.

Original entry on oeis.org

0, 0, 0, 3, 164, 18625, 5491851, 4649088885, 12219849683346
Offset: 0

Views

Author

Gus Wiseman, Jan 01 2024

Keywords

Comments

The axiom of choice says that, given any set of nonempty sets Y, it is possible to choose a set containing an element from each. The strict version requires this set to have the same cardinality as Y, meaning no element is chosen more than once.

Examples

			The a(3) = 3 set-systems:
  {{1},{2},{1,2}}
  {{1},{3},{1,3}}
  {{2},{3},{2,3}}
		

Crossrefs

For a unique choice we have A003024, any length A367904 (ranks A367908).
Sets of n nonempty subsets of {1..n} are counted by A136556.
For any length we have A367903, ranks A367907, no singletons A367769.
The complement is A368601, any length A367902 (see also A367770, A367906).
A000372 counts antichains, covering A006126, nonempty A014466.
A003465 counts covering set-systems, unlabeled A055621.
A058891 counts set-systems, unlabeled A000612.
A059201 counts covering T_0 set-systems.
A323818 counts covering connected set-systems, unlabeled A323819.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Rest[Subsets[Range[n]]], {n}],Length[Select[Tuples[#], UnsameQ@@#&]]==0&]],{n,0,3}]
  • Python
    from itertools import combinations, product, chain
    from scipy.special import comb
    def v(c):
        for elements in product(*c):
            if len(set(elements)) == len(elements):
                return True
        return False
    def a(n):
        if n == 0:
            return 1
        subsets = list(chain.from_iterable(combinations(range(1, n + 1), r) for r in range(1, n + 1)))
        cs = combinations(subsets, n)
        c = sum(1 for c in cs if v(c))
        return c
    [print(int(comb(2**n-1,n) - a(n))) for n in range(7)] # Robert P. P. McKone, Jan 02 2024

Formula

a(n) = A136556(n) - A368601(n).

Extensions

a(6) from Robert P. P. McKone, Jan 02 2024
a(7)-a(8) from Christian Sievers, Jul 25 2024

A368601 Number of ways to choose a set of n nonempty subsets of {1..n} such that it is possible to choose a different element from each.

Original entry on oeis.org

1, 1, 3, 32, 1201, 151286, 62453670, 84707326890, 384641855115279
Offset: 0

Views

Author

Gus Wiseman, Jan 01 2024

Keywords

Comments

The axiom of choice says that, given any set of nonempty sets Y, it is possible to choose a set containing an element from each. The strict version requires this set to have the same cardinality as Y, meaning no element is chosen more than once.

Examples

			The a(2) = 3 set-systems:
  {{1},{2}}
  {{1},{1,2}}
  {{2},{1,2}}
Non-isomorphic representatives of the a(3) = 32 set-systems:
  {{1},{2},{3}}
  {{1},{2},{1,3}}
  {{1},{2},{1,2,3}}
  {{1},{1,2},{1,3}}
  {{1},{1,2},{2,3}}
  {{1},{1,2},{1,2,3}}
  {{1},{2,3},{1,2,3}}
  {{1,2},{1,3},{2,3}}
  {{1,2},{1,3},{1,2,3}}
		

Crossrefs

For a unique choice we have A003024, any length A367904 (ranks A367908).
Sets of n nonempty subsets of {1..n} are counted by A136556.
For any length we have A367902, ranks A367906, no singletons A367770.
The complement is A368600, any length A367903 (see also A367907, A367769).
A000372 counts antichains, covering A006126, nonempty A014466.
A003465 counts covering set-systems, unlabeled A055621.
A058891 counts set-systems, unlabeled A000612.
A059201 counts covering T_0 set-systems.
A323818 counts covering connected set-systems, unlabeled A323819.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Rest[Subsets[Range[n]]], {n}],Length[Select[Tuples[#], UnsameQ@@#&]]>0&]],{n,0,3}]
  • Python
    from itertools import combinations, product, chain
    def v(c):
        for elements in product(*c):
            if len(set(elements)) == len(elements):
                return True
        return False
    def a(n):
        if n == 0:
            return 1
        subsets = list(chain.from_iterable(combinations(range(1, n + 1), r) for r in
    range(1, n + 1)))
        cs = combinations(subsets, n)
        c = sum(1 for c in cs if v(c))
        return c
    [print(a(n)) for n in range(7)] # Robert P. P. McKone, Jan 02 2024

Formula

a(n) + A368600(n) = A136556(n).

Extensions

a(6) from Robert P. P. McKone, Jan 02 2024
a(7)-a(8) from Christian Sievers, Jul 25 2024

A134531 G.f.: Sum_{n>=0} a(n)*x^n/(n!*2^(n*(n-1)/2)) = log( Sum_{n>=0} x^n/(n!*2^(n*(n-1)/2)) ).

Original entry on oeis.org

0, 1, -1, 5, -79, 3377, -362431, 93473345, -56272471039, 77442176448257, -239804482525402111, 1650172344732021412865, -24981899010711376986398719, 825164608171793476724052668417, -59053816996641612758331731690504191, 9102696765174239045811746247171452452865
Offset: 0

Views

Author

Paul D. Hanna, Oct 30 2007

Keywords

Examples

			Let g.f. G(x) = Sum_{n>=0} a(n)*x^n/[ n! * 2^(n*(n-1)/2) ]
then exp(G(x)) = Sum_{n>=0} x^n/[ n! * 2^(n*(n-1)/2) ];
G.f.: G(x) = x - x^2/4 + 5x^3/48 - 79x^4/1536 + 3377x^5/122880 + ...
exp(G(x)) = 1 + x + x^2/4 + x^3/48 + x^4/1536 + x^5/122880 + ...
		

Crossrefs

Cf. related triangles: A134530, A111636.
Cf. A003025, A011266, A118197 (variant).

Programs

  • Mathematica
    a[0] = 0;
    a[n_] := a[n] = 1 - Sum[2^(k(n-k)) Binomial[n-1, k-1] a[k], {k, 1, n-1}];
    Table[a[n], {n, 0, 15}] (* Jean-François Alcover, Jul 26 2018 *)
  • PARI
    {a(n)=n!*2^(n*(n-1)/2)*polcoeff(log(sum(k=0,n,x^k/(k!*2^(k*(k-1)/2)))+x*O(x^n)),n)}

Formula

Equals column 0 of triangle A134530, which is the matrix log of triangle A111636, where A111636(n,k) = (2^k)^(n-k)*C(n,k).
From Peter Bala, Apr 01 2013: (Start)
Let E(x) = Sum_{n >= 0} x^n/(n!*2^C(n,2)). Then a generating function for this sequence (but with a different offset) is E(x)/E(2*x) = Sum_{n >= 0} a(n-1)*x^n/(n!*2^C(n,2)) = 1 - x + 5*x^2/(2!*2) - 79*x^3/(3!*2^3) + 3377*x^4/(4!*2^6) - ....
Recurrence equation:
a(n) = 1 - Sum_{k = 1..n-1} 2^(k*(n-k))*C(n-1,k-1)*a(k) with a(1) = 1. (End)
a(n) = (-1)^(n-1)*A003025(n)/n. - Andrew Howroyd, Jan 07 2022

A350415 Number of acyclic digraphs on n unlabeled nodes with a global source (or sink).

Original entry on oeis.org

1, 1, 3, 16, 164, 3341, 138101, 11578037, 1961162564, 668678055847, 457751797355605, 628137837068751147, 1726130748679532455689, 9493834992383031007906911, 104476428350838383854529661007, 2299979227717819421763629684068904
Offset: 1

Views

Author

Andrew Howroyd, Dec 29 2021

Keywords

Comments

A local source (also called an out-node) is a node whose in-degree is zero. In the case of an acyclic digraph with only one local source, the source is also a global source.

Crossrefs

The labeled case is A003025.
Row sums of A350488.
A diagonal of A122078.

Programs

A058876 Triangle read by rows: T(n,k) = number of labeled acyclic digraphs with n nodes, containing exactly n+1-k points of in-degree zero (n >= 1, 1<=k<=n).

Original entry on oeis.org

1, 1, 2, 1, 9, 15, 1, 28, 198, 316, 1, 75, 1610, 10710, 16885, 1, 186, 10575, 211820, 1384335, 2174586, 1, 441, 61845, 3268125, 64144675, 416990763, 654313415, 1, 1016, 336924, 43832264, 2266772550, 44218682312, 286992935964, 450179768312
Offset: 1

Views

Author

N. J. A. Sloane, Jan 07 2001

Keywords

Examples

			Triangle begins:
  1;
  1,  2;
  1,  9,   15;
  1, 28,  198,   316;
  1, 75, 1610, 10710, 16885;
  ...
		

References

  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, p. 19, (1.6.4).
  • R. W. Robinson, Counting labeled acyclic digraphs, pp. 239-273 of F. Harary, editor, New Directions in the Theory of Graphs. Academic Press, NY, 1973.

Crossrefs

Columns give A058877, A060337.
Diagonals give A003025, A003026, A060335.
Row sums give A003024.
Cf. A122078 (unlabeled case).

Programs

  • Mathematica
    a[p_, k_] :=a[p, k] =If[p == k, 1, Sum[Binomial[p, k]*a[p - k, n]*(2^k - 1)^n*2^(k (p - k - n)), {n,1, p - k}]];
    Map[Reverse, Table[Table[a[p, k], {k, 1, p}], {p, 1, 6}]] // Grid (* Geoffrey Critzer, Aug 29 2016 *)
  • PARI
    A058876(n)={my(v=vector(n)); for(n=1, #v, v[n]=vector(n, i, if(i==n, 1, my(u=v[n-i]); sum(j=1, #u, 2^(i*(#u-j))*(2^i-1)^j*binomial(n,i)*u[j])))); v}
    { my(T=A058876(10)); for(n=1, #T, print(Vecrev(T[n]))) } \\ Andrew Howroyd, Dec 27 2021

Formula

Harary and Prins (following Robinson) give a recurrence.

Extensions

More terms from Vladeta Jovovic, Apr 10 2001

A003026 Number of n-node labeled acyclic digraphs with 2 out-points.

Original entry on oeis.org

1, 9, 198, 10710, 1384335, 416990763, 286992935964, 444374705175516, 1528973599758889005, 11573608032229769067465, 191141381932394665770442818, 6839625961762363728765713227698
Offset: 2

Views

Author

Keywords

References

  • R. W. Robinson, Counting labeled acyclic digraphs, pp. 239-273 of F. Harary, editor, New Directions in the Theory of Graphs. Academic Press, NY, 1973.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A diagonal of A058876.
Cf. A003025.

Programs

Extensions

More terms from Vladeta Jovovic, Apr 10 2001

A350792 Number of digraphs on n labeled nodes with a global source (or sink).

Original entry on oeis.org

1, 2, 24, 1216, 232960, 164069376, 428074336256, 4220285062479872, 160166476125189439488, 23705806454651474422005760, 13794322751716126282614505996288, 31714534285699906476309208596247216128, 288989543377657933541050197425959169851129856
Offset: 1

Views

Author

Andrew Howroyd, Jan 16 2022

Keywords

Comments

A global sink is a node that has out-degree zero and to which all other nodes have a directed path.

Crossrefs

The unlabeled version is A350360.
Row sums of A350793.

Programs

  • PARI
    InitiallyV(15) \\ See A350793 for program code.
    
  • PARI
    seq(n)={my(v=vector(n)); for(n=1, n, v[n] = n*2^((n-1)^2) - sum(k=1, n-1, binomial(n,k)*2^((n-2)*(n-k))*v[k])); v}

Formula

a(n) = n*2^((n-1)^2) - Sum_{k=1..n-1} binomial(n,k)*2^((n-2)*(n-k))*a(k).

A165950 Number of acyclic digraphs on n labeled nodes with one source and one sink.

Original entry on oeis.org

1, 2, 12, 216, 10600, 1306620, 384471444, 261548825328, 402632012394000, 1381332938730123060, 10440873023366019273820, 172308823347127690038311496, 6163501139185639837183141411320, 474942255590583211554917995123517868, 78430816994991932467786587093292327531620
Offset: 1

Views

Author

Vladeta Jovovic, Oct 01 2009

Keywords

Crossrefs

The unlabeled version is A345258.

Programs

  • Mathematica
    nn = 10; B[n_] := n! 2^Binomial[n, 2];e[z_] := Sum[z^n/B[n], {n, 0, nn}];
    egf[ggf_] := Normal[Series[ggf, {z, 0, nn}]] /. Table[z^i -> z^i*2^Binomial[i, 2], {i, 1, nn + 1}]; Map[ Coefficient[#, u v] &,Table[n!, {n, 0, nn}] CoefficientList[ Series[Exp[(u - 1) (v - 1) z] egf[e[(u - 1) z]*1/e[-z]*e[(v - 1) z]], {z, 0, nn}], z]] (* Geoffrey Critzer, Apr 15 2023 *)
  • PARI
    \\ see Marcel et al. link. B(n) is A003025 as vector.
    B(n)={my(a=vector(n)); a[1]=1; for(n=2, #a, a[n]=sum(k=1, n-1, (-1)^(k-1)*binomial(n,k)*(2^(n-k)-1)^k*a[n-k])); a}
    seq(n)={my(a=vector(n), b=B(n)); a[1]=1; for(n=2, #a, a[n]=sum(k=1, n-1, (-1)^(k-1) * binomial(n,k) * k * (2^(n-k)-1)^k * b[n-k])); a} \\ Andrew Howroyd, Jan 01 2022

Extensions

a(1)=1 inserted and terms a(13) and beyond from Andrew Howroyd, Jan 01 2022
Showing 1-10 of 15 results. Next