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 50 results. Next

A173313 Partial sums of A000273.

Original entry on oeis.org

1, 2, 5, 21, 239, 9847, 1550791, 883584231, 1794242777079, 13029751067176631, 341273461704039756983, 32523250658517590150954423, 11366777954076059092024044958647, 14669097059490883945096188099361179575, 70315671284332059012269451652168003452397495
Offset: 0

Views

Author

Jonathan Vos Post, Feb 16 2010

Keywords

Comments

Partial sums of number of directed graphs (or digraphs) with n nodes. The subsequence of primes in this partial sum begins 2, 5, 239, then no more through a(20).
a(n) is the number of isolated points over all directed graphs with (n + 1) nodes. - Geoffrey Critzer, Oct 08 2012

Examples

			a(12) = 1 + 1 + 3 + 16 + 218 + 9608 + 1540944 + 882033440 + 1793359192848 + 13027956824399552 + 341260431952972580352 + 32522909385055886111197440 + 11366745430825400574433894004224.
		

Crossrefs

Cf. A000273.

Programs

  • Maple
    b:= proc(n, i, l) `if`(n=0 or i=1, 1/n!*2^((p-> add(p[j]-1+add(
          igcd(p[k], p[j]), k=1..j-1)*2, j=1..nops(p)))([l[], 1$n])),
          add(b(n-i*j, i-1, [l[], i$j])/j!/i^j, j=0..n/i))
        end:
    a:= proc(n) option remember; b(n$2, [])+`if`(n=0, 0, a(n-1)) end:
    seq(a(n), n=0..16);  # Alois P. Heinz, Sep 04 2019
  • Mathematica
    nn=20;d=Sum[NumberOfDirectedGraphs[n]x^n,{n,0,nn}];CoefficientList[Series[d/(1-x),{x,0,nn}],x]

Formula

a(n) = Sum_{i=0..n} A000273(i).
O.g.f.: A(x)/(1-x) where A(x) is the o.g.f. for A000273. - Geoffrey Critzer, Oct 08 2012

A053763 a(n) = 2^(n^2 - n).

Original entry on oeis.org

1, 1, 4, 64, 4096, 1048576, 1073741824, 4398046511104, 72057594037927936, 4722366482869645213696, 1237940039285380274899124224, 1298074214633706907132624082305024, 5444517870735015415413993718908291383296, 91343852333181432387730302044767688728495783936
Offset: 0

Views

Author

Stephen G Penrice, Mar 29 2000

Keywords

Comments

Nilpotent n X n matrices over GF(2). Also number of simple digraphs (without self-loops) on n labeled nodes (see also A002416).
For n >= 1 a(n) is the size of the Sylow 2-subgroup of the Chevalley group A_n(4) (sequence A053291). - Ahmed Fares (ahmedfares(AT)my-deja.com), Apr 30 2001
(-1)^ceiling(n/2) * resultant of the Chebyshev polynomial of first kind of degree n and Chebyshev polynomial of first kind of degree (n+1) (cf. A039991). - Benoit Cloitre, Jan 26 2003
The number of reflexive binary relations on an n-element set. - Justin Witt (justinmwitt(AT)gmail.com), Jul 12 2005
From Rick L. Shepherd, Dec 24 2008: (Start)
Number of gift exchange scenarios where, for each person k of n people,
i) k gives gifts to g(k) of the others, where 0 <= g(k) <= n-1,
ii) k gives no more than one gift to any specific person,
iii) k gives no single gift to two or more people and
iv) there is no other person j such that j and k jointly give a single gift.
(In other words -- but less precisely -- each person k either gives no gifts or gives exactly one gift per person to 1 <= g(k) <= n-1 others.) (End)
In general, sequences of the form m^((n^2 - n)/2) enumerate the graphs with n labeled nodes with m types of edge. a(n) therefore is the number of labeled graphs with n nodes with 4 types of edge. To clarify the comment from Benoit Cloitre, dated Jan 26 2003, in this context: simple digraphs (without self-loops) have four types of edge. These types of edges are as follows: the absent edge, the directed edge from A -> B, the directed edge from B -> A and the bidirectional edge, A <-> B. - Mark Stander, Apr 11 2019

Examples

			a(2)=4 because there are four 2 x 2 nilpotent matrices over GF(2):{{0,0},{0,0}},{{0,1},{0,0}},{{0,0},{1,0}},{{1,1,},{1,1}} where 1+1=0. - _Geoffrey Critzer_, Oct 05 2012
		

References

  • J. L. Gross and J. Yellen, eds., Handbook of Graph Theory, CRC Press, 2004; p. 521.
  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, p. 5, Eq. (1.1.5).

Crossrefs

Programs

Formula

Sequence given by the Hankel transform (see A001906 for definition) of A059231 = {1, 1, 5, 29, 185, 1257, 8925, 65445, 491825, ...}; example: det([1, 1, 5, 29; 1, 5, 29, 185; 5, 29, 185, 1257; 29, 185, 1257, 8925]) = 4^6 = 4096. - Philippe Deléham, Aug 20 2005
a(n) = 4^binomial(n, n-2). - Zerinvary Lajos, Jun 16 2007
a(n) = Sum_{i=0..n^2-n} binomial(n^2-n, i). - Rick L. Shepherd, Dec 24 2008
G.f. A(x) satisfies: A(x) = 1 + x * A(4*x). - Ilya Gutkovskiy, Jun 04 2020
Sum_{n>=1} 1/a(n) = A319016. - Amiram Eldar, Oct 27 2020
Sum_{n>=0} a(n)*u^n/A002884(n) = Product_{r>=1} 1/(1-u/q^r). - Geoffrey Critzer, Oct 28 2021

A000595 Number of binary relations on n unlabeled points.

Original entry on oeis.org

1, 2, 10, 104, 3044, 291968, 96928992, 112282908928, 458297100061728, 6666621572153927936, 349390545493499839161856, 66603421985078180758538636288, 46557456482586989066031126651104256, 120168591267113007604119117625289606148096, 1152050155760474157553893461743236772303142428672
Offset: 0

Views

Author

Keywords

Comments

Number of orbits under the action of permutation group S(n) on n X n {0,1} matrices. The action is defined by f.M(i,j)=M(f(i),f(j)).
Equivalently, the number of digraphs on n unlabeled nodes with loops allowed but no more than one arc with the same start and end node. - Andrew Howroyd, Oct 22 2017

Examples

			From _Gus Wiseman_, Jun 17 2019: (Start)
Non-isomorphic representatives of the a(2) = 10 relations:
  {}
  {1->1}
  {1->2}
  {1->1, 1->2}
  {1->1, 2->1}
  {1->1, 2->2}
  {1->2, 2->1}
  {1->1, 1->2, 2->1}
  {1->1, 1->2, 2->2}
  {1->1, 1->2, 2->1, 2->2}
(End)
		

References

  • F. Bergeron, G. Labelle and P. Leroux, Combinatorial Species and Tree-Like Structures, Cambridge, 1998, p. 76 (2.2.30)
  • M. D. McIlroy, Calculation of numbers of structures of relations on finite sets, Massachusetts Institute of Technology, Research Laboratory of Electronics, Quarterly Progress Reports, No. 17, Sept. 15, 1955, pp. 14-22.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • GAP
    NSeq := function ( n ) return Sum(List(ConjugacyClasses(SymmetricGroup(n)), c -> (2^Length(Orbits(Group(Representative(c)), CartesianProduct([1..n],[1..n]), OnTuples))) * Size(c)))/Factorial(n); end; # Dan Hoey, May 04 2001
    
  • Mathematica
    Join[{1,2}, Table[CycleIndex[Join[PairGroup[SymmetricGroup[n],Ordered], Permutations[Range[n^2-n+1,n^2]],2],s] /. Table[s[i]->2, {i,1,n^2-n}], {n,2,7}]] (* Geoffrey Critzer, Nov 02 2011 *)
    permcount[v_] := Module[{m=1, s=0, k=0, t}, For[i=1, i <= Length[v], i++, t = v[[i]]; k = If[i>1 && t == v[[i-1]], k+1, 1]; m *= t*k; s += t]; s!/m];
    edges[v_] := Sum[2*GCD[v[[i]], v[[j]]], {i, 2, Length[v]}, {j, 1, i - 1}] + Total[v];
    a[n_] := (s=0; Do[s += permcount[p]*2^edges[p], {p, IntegerPartitions[n]}]; s/n!);
    Table[a[n], {n, 0, 15}] (* Jean-François Alcover, Jul 08 2018, after Andrew Howroyd *)
    dinorm[m_]:=If[m=={},{},If[Union@@m!=Range[Max@@Flatten[m]],dinorm[m/.Apply[Rule,Table[{(Union@@m)[[i]],i},{i,Length[Union@@m]}],{1}]],First[Sort[dinorm[m,1]]]]];
    dinorm[m_,aft_]:=If[Length[Union@@m]<=aft,{m},With[{mx=Table[Count[m,i,{2}],{i,Select[Union@@m,#1>=aft&]}]},Union@@(dinorm[#1,aft+1]&)/@Union[Table[Map[Sort,m/.{par+aft-1->aft,aft->par+aft-1},{0}],{par,First/@Position[mx,Max[mx]]}]]]];
    Table[Length[Union[dinorm/@Subsets[Tuples[Range[n],2]]]],{n,0,3}] (* Gus Wiseman, Jun 17 2019 *)
  • PARI
    permcount(v) = {my(m=1,s=0,k=0,t); for(i=1,#v,t=v[i]; k=if(i>1&&t==v[i-1],k+1,1); m*=t*k;s+=t); s!/m}
    edges(v) = {sum(i=2, #v, sum(j=1, i-1, 2*gcd(v[i],v[j]))) + sum(i=1, #v, v[i])}
    a(n) = {my(s=0); forpart(p=n, s+=permcount(p)*2^edges(p)); s/n!} \\ Andrew Howroyd, Oct 22 2017
    
  • Python
    from itertools import product
    from math import prod, factorial, gcd
    from fractions import Fraction
    from sympy.utilities.iterables import partitions
    def A000595(n): return int(sum(Fraction(1<Chai Wah Wu, Jul 02 2024

Formula

a(n) = sum {1*s_1+2*s_2+...=n} (fixA[s_1, s_2, ...] / (1^s_1*s_1!*2^s_2*s_2!*...)) where fixA[s_1, s_2, ...] = 2^sum {i, j>=1} (gcd(i, j)*s_i*s_j). - Christian G. Bower, Jan 05 2004
a(n) ~ 2^(n^2)/n! [McIlroy, 1955]. - Vaclav Kotesovec, Dec 19 2016

Extensions

More terms from Vladeta Jovovic, Feb 07 2000
Still more terms from Dan Hoey, May 04 2001

A003085 Number of weakly connected digraphs with n unlabeled nodes.

Original entry on oeis.org

1, 2, 13, 199, 9364, 1530843, 880471142, 1792473955306, 13026161682466252, 341247400399400765678, 32522568098548115377595264, 11366712907233351006127136886487, 14669074325902449468573755897547924182
Offset: 1

Views

Author

Keywords

References

  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, pp. 124 and 241.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Row sums of A054733.
Column sums of A350789.
The labeled case is A003027.
Cf. A000273, A003084, A035512 (strongly connected).

Programs

  • Maple
    # The function EulerInvTransform is defined in A358451.
    a := EulerInvTransform(A000273):
    seq(a(n), n = 1..13); # Peter Luschny, Nov 21 2022
  • Mathematica
    Needs["Combinatorica`"]; d[n_] := GraphPolynomial[n, x, Directed] /. x -> 1; max = 13; se = Series[ Sum[a[n]*x^n/n, {n, 1, max}] - Log[1 + Sum[ d[n]*x^n, {n, 1, max}]], {x, 0, max}]; sol = SolveAlways[ se == 0, x]; Do[ A003084[n] = a[n] /. sol[[1]], {n, 1, max}]; ClearAll[a, d]; a[n_] := (1/n)*Sum[ MoebiusMu[ n/d ] * A003084[d], {d, Divisors[n]} ]; Table[ a[n], {n, 1, max}] (* Jean-François Alcover, Feb 01 2012, after formula *)
    terms = 13;
    permcount[v_] := Module[{m = 1, s = 0, k = 0, t}, For[i = 1, i <= Length[v], i++, t = v[[i]]; k = If[i > 1 && t == v[[i - 1]], k + 1, 1]; m *= t*k; s += t]; s!/m];
    edges[v_] := Sum[2*GCD[v[[i]], v[[j]]], {i, 2, Length[v]}, {j, 1, i - 1}] + Total[v - 1];
    d[n_] := (s = 0; Do[s += permcount[p]*2^edges[p], {p, IntegerPartitions[n]} ]; s/n!);
    A003084 = CoefficientList[Log[Sum[d[n] x^n, {n, 0, terms+1}]] + O[x]^(terms + 1), x] Range[0, terms] // Rest;
    a[n_] := (1/n)*Sum[MoebiusMu[n/d] * A003084[[d]], {d, Divisors[n]}];
    Table[a[n], {n, 1, terms}] (* Jean-François Alcover, Aug 30 2019, after Andrew Howroyd in A003084 *)
  • Python
    from functools import lru_cache
    from itertools import product, combinations
    from fractions import Fraction
    from math import prod, gcd, factorial
    from sympy import mobius, divisors
    from sympy.utilities.iterables import partitions
    def A003085(n):
        @lru_cache(maxsize=None)
        def b(n): return int(sum(Fraction(1<Chai Wah Wu, Jul 05 2024

Formula

a(n) = (1/n)*Sum_{d|n} mu(n/d)*A003084(d), where mu is Moebius function.
Inverse Euler transform of A000273. - Andrew Howroyd, Dec 27 2021

Extensions

More terms from Vladeta Jovovic, Jan 09 2000

A052283 Triangle read by rows: T(n,k) is the number of unlabeled directed graphs on n nodes with k arcs, k=0..n*(n-1).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 1, 1, 1, 1, 5, 13, 27, 38, 48, 38, 27, 13, 5, 1, 1, 1, 1, 5, 16, 61, 154, 379, 707, 1155, 1490, 1670, 1490, 1155, 707, 379, 154, 61, 16, 5, 1, 1, 1, 1, 5, 17, 76, 288, 1043, 3242, 8951, 21209, 43863, 78814, 124115, 171024, 207362, 220922, 207362, 171024, 124115, 78814, 43863, 21209, 8951, 3242, 1043, 288, 76, 17, 5, 1, 1
Offset: 0

Views

Author

Vladeta Jovovic, Feb 07 2000

Keywords

Comments

Triangular array read by rows T(n,k) is the number of unlabeled directed graphs (no self loops allowed) on n nodes with exactly k edges where n >= 1, 0 <= k <= n(n-1). - Geoffrey Critzer, Nov 01 2011

Examples

			[1],
[1],
[1,1,1],
[1,1,4,4,4,1,1],
[1,1,5,13,27,38,48,38,27,13,5,1,1];
(the last batch giving the numbers of directed graphs with 4 nodes and from 0 to 12 arcs).
		

References

  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973, p. 247.
  • J. L. Gross and J. Yellen, eds., Handbook of Graph Theory, CRC Press, 2004; p. 522.

Crossrefs

Cf. A000273 (row sums), A070166, A008406, A003085, A283753 (weakly connected).

Programs

  • Mathematica
    Table[CoefficientList[GraphPolynomial[n, x, Directed], x], {n, 1, 10}] (* Geoffrey Critzer, Nov 01 2011 *)
    permcount[v_] := Module[{m = 1, s = 0, k = 0, t}, For[i = 1, i <= Length[v], i++, t = v[[i]]; k = If[i > 1 && t == v[[i - 1]], k + 1, 1]; m *= t*k; s += t]; s!/m];
    edges[v_, t_] := Product[g = GCD[v[[i]], v[[j]]]; t[v[[i]]*v[[j]]/g]^(2 g), {i, 2, Length[v]}, {j, 1, i-1}] * Product[ t[v[[i]]]^(v[[i]] - 1), {i, 1, Length[v]}];
    gp[n_] := (s = 0; Do[s += permcount[p]*edges[p, 1 + x^# &], {p, IntegerPartitions[n]}]; s/n!);
    A052283 = Reap[For[n = 1, n <= 6, n++, p = gp[n]; For[k = 0, k <= Exponent[p, x], k++, Sow[Coefficient[p, x, k]]]]][[2, 1]] (* Jean-François Alcover, Jul 09 2018, after Andrew Howroyd *)
  • PARI
    permcount(v) = {my(m=1,s=0,k=0,t); for(i=1,#v,t=v[i]; k=if(i>1&&t==v[i-1],k+1,1); m*=t*k;s+=t); s!/m}
    edges(v,t) = {prod(i=2, #v, prod(j=1, i-1, my(g=gcd(v[i],v[j])); t(v[i]*v[j]/g)^(2*g))) * prod(i=1, #v, t(v[i])^(v[i]-1))}
    gp(n) = {my(s=0); forpart(p=n, s+=permcount(p)*edges(p,i->1+x^i)); s/n!}
    for(n=1, 6, my(p=gp(n)); for(k=0, poldegree(p), print1(polcoeff(p,k), ", ")); print); \\ Andrew Howroyd, Nov 05 2017

Formula

T(n,0) = T(n,1) = T(n,n(n-1)-1) = T(n,n) = 1. - Geoffrey Critzer, Nov 01 2011
T(2k,k) = T(2k+1,k) = T(2k+2,k) =... and is the maximum value of column k. - Geoffrey Critzer, Nov 01 2011

Extensions

a(0)=1 prepended and terms a(62) and beyond from Andrew Howroyd, Apr 20 2020

A053418 Number of unlabeled directed graphs with n arcs and no isolated vertices.

Original entry on oeis.org

1, 1, 5, 17, 80, 365, 1981, 11222, 69511, 455663, 3169244, 23170347, 177513359, 1418920570, 11798710013, 101778754655, 908722427531, 8380602471646, 79692654473866, 780142956502644, 7851084073063731, 81120767066417308
Offset: 0

Views

Author

Vladeta Jovovic, Jan 10 2000

Keywords

Crossrefs

The labeled version is A121252.
Column sums of A350908.
Cf. A000273, A000664, A053454, A053598 (by # of nodes).

Formula

Euler transform of A053454. - Andrew Howroyd, Jan 28 2022

Extensions

Edited and extended by Max Alekseyev, Sep 18 2009

A328773 Irregular triangle read by rows: T(n,k) is the number of colored digraphs on n nodes with color scheme given by the partitions of n in canonical ordering.

Original entry on oeis.org

1, 1, 3, 4, 16, 36, 64, 218, 752, 1104, 2112, 4096, 9608, 45960, 90416, 178944, 266496, 528384, 1048576, 1540944, 9133760, 22692704, 45277312, 30194176, 90196736, 180011008, 135032832, 269500416, 537919488, 1073741824
Offset: 0

Views

Author

Peter Dolland, Oct 27 2019

Keywords

Comments

Colors are not interchangeable. Adjacent nodes may have the same color.
A partition [b_1, ..., b_m] with b_i > 0 and Sum_{i=1..m} b_i = n corresponds to a color scheme on n nodes having m colors. To find out which digraphs are equivalent with respect to a color scheme, consider the automorphism group on the partition. This group is the m-fold product of the symmetric groups on the b_i nodes, and therefore contains Product_{i=1..m} b_i! elements (i.e. the permutations).
Calculate the number of equivalence classes by determining the cycle index of the group induced by the automorphism group in the set of the edges [(i,j)|i,j in [1..n]; i != j] and set, with Pólya, the variable values to 2.
The left column of the triangle gives the number of unlabeled digraphs, while the right flank of the triangle gives the number of labeled digraphs.
Canonical ordering is also known as graded reverse lexicographic ordering, see A080577, A063008, or link below. Partitions here have the property b_i >= b_j for i < j.

Examples

			The sequence begins:
      1;
      1;
      3,       4;
     16,      36,       64;
    218,     752,     1104,     2112,     4096;
   9608,   45960,    90416,   178944,   266496,   528384,   1048576;
   ...
For n = 3, the three partitions of n are [3], [2, 1] and [1, 1, 1]. T(n,1) = 16 gives the number of colored digraphs with all nodes having the same color; T(n, 2) = 36 gives the number of colored digraphs with two nodes having the first color and one node having the second color; T(n, 3) gives the number of colored digraphs with each node having its own color.
For n = 5, k = 4 the required partition is [3,1,1]. T(5,4) = 178944 is then the number of colored digraphs with 5 nodes, where 3 nodes have the first color and the other two nodes each has its own color.
		

References

  • N. G. de Bruijn, Pólyas Abzähl-Theorie: Muster für Graphen und chemische Verbindungen, Selecta Mathematica III, Springer-Verlag (1971), 1-55.

Crossrefs

Cf. A000041 equals the row length, A080577 lists the partitions in the used order, A063008 instantiates the index sequences encoding the partitions. A000273 and A053763 represent the flanks of the triangle.

Programs

  • PARI
    \\ here C(p) computes sequence value for given partition.
    permcount(v) = {my(m=1,s=0,k=0,t); for(i=1,#v,t=v[i]; k=if(i>1&&t==v[i-1],k+1,1); m*=t*k;s+=t); s!/m}
    edges(v) = {sum(i=2, #v, sum(j=1, i-1, 2*gcd(v[i],v[j]))) + sum(i=1, #v, v[i]-1)}
    C(p)={((i,v)->if(i>#p, 2^edges(v), my(s=0); forpart(q=p[i], s+=permcount(q)*self()(i+1, concat(v,Vec(q)))); s/p[i]!))(1, [])}
    Row(n)={apply(C, vecsort([Vecrev(p) | p<-partitions(n)], ,4))}
    { for(n=0, 6, print(Row(n))) } \\ Andrew Howroyd, Nov 02 2019

Formula

T(n, 1) = A000273(n).
T(n, A000041(n)) = A053763(n) = 2^(n^2 - n).
T(n, A000041(n)-1) = 2^(n^2 - 3*n - 1) * (2^(2*n) + 8) for n > 1.

A006023 Number of unlabeled mating digraphs with n nodes.

Original entry on oeis.org

1, 1, 2, 12, 183, 8884, 1495984, 872987584, 1787227218134, 13013640978954744, 341143259362180445672, 32519497484526664873838560, 11366387701006542223325518765872, 14668949294272099348849331250968826816
Offset: 0

Views

Author

Keywords

References

  • R. C. Read, The Enumeration of Mating-Type Graphs. Report CORR 89-38, Dept. Combinatorics and Optimization, Univ. Waterloo, Oct 1989.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    permcount[v_] := Module[{m = 1, s = 0, t, i, k = 0}, For[i = 1, i <= Length[v], i++, t = v[[i]]; k = If[i > 1 && t == v[[i - 1]], k + 1, 1]; m *= t*k; s += t]; s!/m];
    edges[v_] := Sum[2*GCD[v[[i]], v[[j]]], {i, 2, Length[v]}, {j, 1, i - 1}] + Sum[v[[i]] - 1, {i, 1, Length[v]}];
    a[n_] := Module[{s = 0}, If[n == 0, Return[1]]; Sum[Do[ s += permcount[p]* 2^edges[p] * Coefficient[Product[1 - x^p[[i]], {i, 1, Length[p]}], x, n - k]/k!, {p, IntegerPartitions[k]}], {k, 1, n}]; s];
    a /@ Range[0, 20] (* Jean-François Alcover, Sep 22 2019, after Andrew Howroyd *)
  • PARI
    \\ compare A000273.
    permcount(v) = {my(m=1, s=0, k=0, t); for(i=1, #v, t=v[i]; k=if(i>1&&t==v[i-1], k+1, 1); m*=t*k; s+=t); s!/m}
    edges(v) = {sum(i=2, #v, sum(j=1, i-1, 2*gcd(v[i], v[j]))) + sum(i=1, #v, v[i]-1)}
    a(n) = {if(n<1, n==0, my(s=0); sum(k=1, n, forpart(p=k, s+=permcount(p) * 2^edges(p) * polcoef(prod(i=1, #p, 1-x^p[i]), n-k)/k!)); s)} \\ Andrew Howroyd, Sep 09 2018

Formula

G.f. Sum_{n>=1} x^n * (Sum_{(j)} h((j)) * 2^Y((j)) * Product_{i=1..n} (1-x^i)^{j_i}) where the inner sum runs over all partitions (j) = j_1j_2...j_m of n = 1 * j_1 + 2 * j_2 + ... m * j_m, h((j)) = 1 / Product{i=1..m} (j_i! * i^{j_i}), and Y((j)) = Sum_{i=1..m} (i-1) * j_i + Sum_{i=1..m} i * j_i * (j_i - 1) + 2 * Sum_{1 <= i < k <= m} j_i * j_k * gcd(i, k). - Sean A. Irvine, Mar 06 2018

Extensions

a(0)=1 prepended by Andrew Howroyd, Sep 09 2018

A053598 Number of n-node unlabeled digraphs without isolated nodes.

Original entry on oeis.org

1, 0, 2, 13, 202, 9390, 1531336, 880492496, 1792477159408, 13026163465206704, 341247403996148180800, 32522568124623933138617088, 11366712907916015518547782806784, 14669074325967499043636521641422216704, 70315641946149306808455637518883828774996992
Offset: 0

Views

Author

Vladeta Jovovic, Apr 10 2000

Keywords

Comments

Equals first differences of A000273.

Crossrefs

Cf. A000273, A002494, A053418 (by # arcs). Row sums of A350908.

Programs

  • Maple
    b:= proc(n, i, l) `if`(n=0 or i=1, 1/n!*2^((p-> add(p[j]-1+add(
          igcd(p[k], p[j]), k=1..j-1)*2, j=1..nops(p)))([l[], 1$n])),
          add(b(n-i*j, i-1, [l[], i$j])/j!/i^j, j=0..n/i))
        end:
    a:= n-> b(n$2, [])-`if`(n=0, 0, b(n-1$2, [])):
    seq(a(n), n=0..16);  # Alois P. Heinz, Sep 04 2019
  • Mathematica
    Needs["Combinatorica`"];
    nn=15;s=Sum[NumberOfDirectedGraphs[n]x^n,{n,0,nn}];CoefficientList[Series[s (1-x),{x,0,nn}],x]  (* Geoffrey Critzer, Oct 09 2012 *)
    Join[{1}, Table[GraphPolynomial[n, x, Directed] /. x -> 1, {n, 0, 15}] // Differences] (* Jean-François Alcover, Feb 04 2015 *)
  • Python
    from itertools import combinations
    from math import prod, factorial, gcd
    from fractions import Fraction
    from sympy.utilities.iterables import partitions
    def A053598(n): return int(sum(Fraction(1<Chai Wah Wu, Jul 05 2024

Formula

O.g.f.: A(x)*(1-x) where A(x) is o.g.f. for A000273. - Geoffrey Critzer, Oct 09 2012

A326222 Number of non-Hamiltonian unlabeled n-vertex digraphs (without loops).

Original entry on oeis.org

1, 0, 2, 12, 157, 5883, 696803, 255954536
Offset: 0

Views

Author

Gus Wiseman, Jun 15 2019

Keywords

Comments

A digraph is Hamiltonian if it contains a directed cycle passing through every vertex exactly once.

Crossrefs

The labeled case is A326218 (without loops) or A326220 (with loops).
The undirected case (without loops) is A246446.
The case with loops is A326223.
Hamiltonian unlabeled digraphs are A326225 (without loops) or A003216 (with loops).

Formula

a(n) = A000273(n) - A326225(n). - Pontus von Brömssen, Mar 17 2024

Extensions

a(5)-a(7) (using A000273 and A326225) from Pontus von Brömssen, Mar 17 2024
Showing 1-10 of 50 results. Next