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.

Previous Showing 11-19 of 19 results.

A004107 Number of self-dual nets with 2n nodes.

Original entry on oeis.org

1, 1, 9, 165, 24651, 29522961, 286646256675, 21717897090413481, 12980536689318626076840, 62082697145168772833294318409, 2405195296608025717214293025492960466, 762399078635131851885116768114137369439908725
Offset: 0

Views

Author

Keywords

Comments

A net in this context is a graph with both signed vertices and signed edges. A net is self-dual if changing the signs on all edges and vertices leaves the graph unchanged up to isomorphism. - Andrew Howroyd, Sep 25 2018

References

  • F. Harary and R. W. Robinson, Exposition of the enumeration of point-line-signed graphs, pp. 19 - 33 of Proc. Second Caribbean Conference Combinatorics and Computing (Bridgetown, 1977). Ed. R. C. Read and C. C. Cadogan. University of the West Indies, Cave Hill Campus, Barbados, 1977. vii+223 pp.
  • R. W. Robinson, personal communication.
  • R. W. Robinson, Numerical implementation of graph counting algorithms, AGRC Grant, Math. Dept., Univ. Newcastle, Australia, 1976.
  • 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, 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_] := 2 Sum[Sum[GCD[v[[i]], v[[j]]], {j, 1, i - 1}], {i, 2, Length[v]}] + Sum[2 Quotient[v[[i]], 2], {i, 1, Length[v]}];
    a[n_] := Module[{s = 0}, Do[s += permcount[p]*3^edges[p], {p, IntegerPartitions[n]}]; s/n!];
    Array[a, 12, 0] (* Jean-François Alcover, Aug 17 2019, 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) = {2*sum(i=2, #v, sum(j=1, i-1, gcd(v[i], v[j]))) + sum(i=1, #v, v[i]\2*2)}
    a(n) = {my(s=0); forpart(p=n, s+=permcount(p)*3^edges(p)); s/n!} \\ Andrew Howroyd, Sep 25 2018
    
  • Python
    from itertools import combinations
    from math import prod, gcd, factorial
    from fractions import Fraction
    from sympy.utilities.iterables import partitions
    def A004107(n): return int(sum(Fraction(3**((sum(p[r]*p[s]*gcd(r,s) for r,s in combinations(p.keys(),2))<<1)+sum(((q&-2)+q*(r-1))*r for q, r in p.items())),prod(q**r*factorial(r) for q, r in p.items())) for p in partitions(n))) # Chai Wah Wu, Jul 09 2024

Extensions

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

A053420 Number of 4-multigraphs on n nodes.

Original entry on oeis.org

1, 5, 35, 900, 90005, 43571400, 95277592625, 925609100039625, 40119721052610123750, 7833164300852979350336250, 6953552738579427778531249187500, 28293472829338822230349054996265275000, 531350037528849507720092485196308155336875000
Offset: 1

Views

Author

Vladeta Jovovic, Jan 11 2000

Keywords

References

  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973.

Crossrefs

Column k=4 of A063841.

Programs

  • Python
    from itertools import combinations
    from math import prod, gcd, factorial
    from fractions import Fraction
    from sympy.utilities.iterables import partitions
    def A053420(n): return int(sum(Fraction(5**(sum(p[r]*p[s]*gcd(r,s) for r,s in combinations(p.keys(),2))+sum((q>>1)*r+(q*r*(r-1)>>1) for q, r in p.items())),prod(q**r*factorial(r) for q, r in p.items())) for p in partitions(n))) # Chai Wah Wu, Jul 09 2024

Extensions

Terms a(12) and beyond from Andrew Howroyd, Oct 22 2017

A053421 Number of 5-multigraphs on n nodes.

Original entry on oeis.org

1, 6, 56, 2451, 533358, 661452084, 4364646955812, 152397092027960154, 28427450083725134688228, 28645398830642924774967347088, 157458251108667629202718200130101672, 4760428376101385226312810920945121043818096
Offset: 1

Views

Author

Vladeta Jovovic, Jan 11 2000

Keywords

References

  • F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973.

Crossrefs

Column k=5 of A063841.

Programs

  • Python
    from itertools import combinations
    from math import prod, gcd, factorial
    from fractions import Fraction
    from sympy.utilities.iterables import partitions
    def A053421(n): return int(sum(Fraction(6**(sum(p[r]*p[s]*gcd(r,s) for r,s in combinations(p.keys(),2))+sum((q>>1)*r+(q*r*(r-1)>>1) for q, r in p.items())),prod(q**r*factorial(r) for q, r in p.items())) for p in partitions(n))) # Chai Wah Wu, Jul 09 2024

Extensions

a(12) from Andrew Howroyd, Oct 22 2017

A053513 Number of 2-multigraphs with loops on n nodes.

Original entry on oeis.org

3, 18, 165, 3132, 137268, 15548004, 4679446950, 3771927027864, 8186669639820081, 48184182482857319682, 774912347548961791914585, 34299111628183837790980740312, 4205499936656520106909422649497294
Offset: 1

Views

Author

Vladeta Jovovic, Jan 14 2000

Keywords

Comments

A 2-multigraph is similar to an ordinary graph except there are 0, 1 or 2 edges between any two nodes (self-loops are not allowed).

Crossrefs

Programs

  • Mathematica
    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[GCD[v[[i]], v[[j]]], {i, 2, Length[v]}, {j, 1, i - 1}] + Total[Quotient[v, 2] + 1];
    a[n_] := (s=0; Do[s += permcount[p]*3^edges[p], {p, IntegerPartitions[n]}]; s/n!);
    Array[a, 15] (* Jean-François Alcover, Jul 08 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) = {sum(i=2, #v, sum(j=1, i-1, gcd(v[i],v[j]))) + sum(i=1, #v, v[i]\2 + 1)}
    a(n) = {my(s=0); forpart(p=n, s+=permcount(p)*3^edges(p)); s/n!} \\ Andrew Howroyd, Oct 22 2017
    
  • Python
    from itertools import combinations
    from math import prod, gcd, factorial
    from fractions import Fraction
    from sympy.utilities.iterables import partitions
    def A053513(n): return int(sum(Fraction(3**(sum(p[r]*p[s]*gcd(r,s) for r,s in combinations(p.keys(),2))+sum(((q>>1)+1)*r+(q*r*(r-1)>>1) for q, r in p.items())),prod(q**r*factorial(r) for q, r in p.items())) for p in partitions(n))) # Chai Wah Wu, Jul 09 2024

A007127 Definition (1): Number of unlabeled strength-2 Eulerian graphs with n nodes.

Original entry on oeis.org

1, 2, 5, 18, 100, 1242, 43425, 4925635, 1678993887, 1613875721946, 4293014800909806, 31574944534364259507, 644483327087699659771857, 36676558984788056550610362834, 5846161177591490590945591554686844, 2621219060849255874034814155021919844156
Offset: 1

Views

Author

Keywords

Comments

Definition (2): Number of Eulerian 2-multigraphs with n nodes.
Definition (3): Number of switching classes of signed graphs on n unlabeled nodes.
Definition (4): Number of switching classes of 2-multigraphs with n nodes
Definition (1) is same as Definition (2). - Vladeta Jovovic, Mar 15 2009
Definition (3) is same as Definition (4). - Vladeta Jovovic, Mar 15 2009
That Definition (2) is same as Definition (4) follows from Theorem 8.3 of Cameron (1977). - N. J. A. Sloane, Mar 22 2009

References

  • F. C. Bussemaker, P. J. Cameron, J. J. Seidel, and S. V. Tsaranov, Tables of signed graphs, Report-WSK 91-01, Eindhoven University of Technology, Department of Mathematics and Computing Science, Eindhoven, 1991, 105 pp. (MR: 92g:05001).
  • R. W. Robinson, personal communication.
  • R. W. Robinson, Numerical implementation of graph counting algorithms, AGRC Grant, Math. Dept., Univ. Newcastle, Australia, 1980.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Extensions

Extended by N. J. A. Sloane from Robinson's table, Oct 20 2006
Edited by N. J. A. Sloane, Mar 30 2009. Does the Cameron paper provide a formula? What about the labeled version? (Compare A002854.)
Corrected by Vladeta Jovovic, Apr 04 2009

A034892 Number of balanced signed graphs on n unlabeled nodes.

Original entry on oeis.org

1, 1, 3, 8, 39, 226, 2283, 36789, 1062679, 55717077, 5405078682, 972656526492, 325183692812200, 202373967993972497, 235081289816026793049, 511296223391186047847309, 2088912833728676472658628201, 16081914207958884651686215477871, 234010862353438997655954463710225233
Offset: 0

Views

Author

Ronald C. Read

Keywords

References

  • R. C. Read and R. J. Wilson, An Atlas of Graphs, Oxford, 1998.

Crossrefs

Formula

Euler transform of A318590.

Extensions

Name clarified and offset corrected by Andrew Howroyd, Sep 25 2018
a(0)=1 prepended and terms a(13) and beyond from Andrew Howroyd, Sep 25 2018

A320499 Number of connected self-dual signed graphs with n nodes.

Original entry on oeis.org

1, 1, 0, 1, 3, 14, 62, 572, 7409, 163284, 5736443, 342169618, 33534945769, 5442700283638, 1484664946343496, 664513607618098252, 508538464299389501337, 635542752091150346032474, 1374528064543283977151585962, 4842758246111267151697826493193
Offset: 0

Views

Author

N. J. A. Sloane, Oct 26 2018

Keywords

Crossrefs

Cf. A004102 (signed graphs), A004104 (self-dual), A053465 (connected signed graphs).

Programs

Formula

a(2*n-1) = b(2*n-1), a(2*n) = b(2*n) - (A053465(n) - a(n))/2 where b is the Inverse Euler transform of A004104. - Andrew Howroyd, Jan 27 2020

Extensions

Dead sequence restored by Andrew Howroyd, Jan 26 2020
a(0)=1 prepended and terms a(13) and beyond from Andrew Howroyd, Jan 26 2020

A199840 Triangle read by rows: T(n,k) is the number of 2-multigraphs on n nodes having exactly k edges, with n >= 1 and 0 <= k <= n*(n-1).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 3, 5, 8, 9, 12, 9, 8, 5, 3, 1, 1, 1, 1, 3, 6, 14, 24, 43, 62, 87, 100, 110, 100, 87, 62, 43, 24, 14, 6, 3, 1, 1, 1, 1, 3, 7, 18, 40, 91, 180, 352, 616, 1006, 1483, 2036, 2522, 2891, 3012, 2891, 2522, 2036, 1483, 1006, 616, 352, 180, 91, 40, 18, 7, 3, 1, 1
Offset: 1

Views

Author

Geoffrey Critzer, Nov 11 2011

Keywords

Comments

Here a 2-multigraph is an unlabeled graph with at most 2 edges connecting any vertex pair with no self loops allowed.

Examples

			Triangle begins:
  1;
  1, 1, 1;
  1, 1, 2, 2, 2, 1, 1;
  1, 1, 3, 5, 8, 9, 12, 9, 8, 5, 3, 1, 1;
  ...
		

Crossrefs

Row sums are A004102.
Cf. A008406.

Programs

  • Mathematica
    Table[CoefficientList[Expand[PairGroupIndex[SymmetricGroup[n],s] /. Table[s[i]->1+x^i+x^(2i), {i,1,Binomial[n,2]}]], x], {n, 1, 6}]
    (* Second program: *)
    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]^g, {i, 2, Length[v]}, {j, 1, i - 1}]*Product[c = v[[i]]; t[c]^Quotient[c - 1, 2]*If[OddQ[c], 1, t[c/2]], {i, 1, Length[v]}];
    row[n_] := Module[{s=0}, Do[s += permcount[p]*edges[p, 1 + x^# + x^(2#)&], {p, IntegerPartitions[n]}]; s/n!] // Expand // CoefficientList[#, x]&;
    Array[row, 6] // Flatten (* Jean-François Alcover, Jan 08 2021, 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)^g )) * prod(i=1, #v, my(c=v[i]); t(c)^((c-1)\2)*if(c%2, 1, t(c/2)))}
    Row(n) = {my(s=0); forpart(p=n, s+=permcount(p)*edges(p, i->1+x^i+(x^2)^i)); Vecrev(s/n!)}
    { for(n=1, 6, print(Row(n))) } \\ Andrew Howroyd, Nov 07 2019

Extensions

Terms a(46) and beyond from Andrew Howroyd, Nov 07 2019

A320488 Inverse Euler transform of A004104.

Original entry on oeis.org

1, 1, 0, 1, 4, 14, 65, 572, 7434, 163284, 5736792, 342169618, 33534958026, 5442700283638, 1484664947481018, 664513607618098252, 508538464299684269212, 635542752091150346032474, 1374528064543284187245552390, 4842758246111267151697826493193, 29772724415959420224886585241636839
Offset: 0

Views

Author

N. J. A. Sloane, Oct 25 2018

Keywords

Comments

The inverse Euler transform of A004104 does not give the number of connected self-dual signed graphs. The combinatorial interpretation of this sequence is that of either a connected self-dual signed graph or a pair of distinct connected signed graphs which are dual to each other (but not self-dual). - Andrew Howroyd, Jan 26 2020

Crossrefs

Extensions

Definition edited by Andrew Howroyd, Jan 26 2020
Previous Showing 11-19 of 19 results.