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

A004103 Number of nets on n unlabeled nodes.

Original entry on oeis.org

1, 2, 9, 56, 705, 19548, 1419237, 278474976, 148192635483, 213558945249402, 836556995284293897, 8962975658381123937708, 264404516190234685662666051, 21610417954162750247842392794292, 4921335335427778307286708119839406529, 3138313838161414849743136458064895837170596
Offset: 0

Views

Author

Keywords

Comments

A net in this context is a graph with both signed vertices and signed edges. - 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

Cf. A004102 (signed edges only), A000666 (signed vertices only).
Cf. A004107.

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[Sum[GCD[v[[i]], v[[j]]], {j, 1, i - 1}], {i, 2, Length[v]}] + Sum[Quotient[v[[i]], 2], {i, 1, Length[v]}];
    a[n_] := Module[{s = 0}, Do[s += permcount[p]*3^edges[p]*2^Length[p], {p, IntegerPartitions[n]}]; s/n!];
    Array[a, 16, 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) = {sum(i=2, #v, sum(j=1, i-1, gcd(v[i], v[j]))) + sum(i=1, #v, v[i]\2)}
    a(n) = {my(s=0); forpart(p=n, s+=permcount(p)*3^edges(p)*2^#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 A004103(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)*r+(q*r*(r-1)>>1) for q, r in p.items()))<Chai Wah Wu, Jul 09 2024

Extensions

a(0)=1 prepended and a(13)-a(14) added by Andrew Howroyd, Sep 25 2018

A004106 Number of line-self-dual nets (or edge-self-dual nets) with n nodes.

Original entry on oeis.org

1, 2, 3, 8, 29, 148, 1043, 11984, 229027, 6997682, 366204347, 30394774084, 4363985982959, 994090870519508, 393850452332173999, 249278602955869472540, 275042591834324901085904, 488860279973733024992540668, 1514493725905920009795681408275
Offset: 0

Views

Author

Keywords

Comments

A net in this context is a graph with both signed vertices and signed edges. A net is line-self-dual if changing the signs on all edges 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_] := Sum[Sum[If[Mod[v[[i]] v[[j]], 2] == 0, GCD[v[[i]], v[[j]]], 0], {j, 1, i - 1}], {i, 2, Length[v]}] + Sum[If[Mod[v[[i]], 2] == 0, 2 Quotient[v[[i]], 4], 0], {i, 1, Length[v]}];
    a[n_] := Module[{s = 0}, Do[s += permcount[p]*3^edges[p]*2^Length[p], {p, IntegerPartitions[n]}]; s/n!];
    Array[a, 19, 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) = {sum(i=2, #v, sum(j=1, i-1, if(v[i]*v[j]%2==0, gcd(v[i], v[j])))) + sum(i=1, #v, if(v[i]%2==0, v[i]\4*2))}
    a(n) = {my(s=0); forpart(p=n, s+=permcount(p)*3^edges(p)*2^#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 A004106(n): return int(sum(Fraction(3**(sum(p[r]*p[s]*gcd(r,s) for r,s in combinations(p.keys(),2) if not (r&1 and s&1))+sum(((q>>1)&-2)*r+(q*r*(r-1)>>1) for q, r in p.items() if q&1^1))<Chai Wah Wu, Jul 10 2024

Extensions

a(0)=1 prepended and a(17)-a(18) added by Andrew Howroyd, Sep 25 2018

A320995 Number of connected self-dual nets with 2n nodes.

Original entry on oeis.org

1, 0, 5, 136, 24162, 29488085, 286615837574, 21717610066598371, 12980514969049888065118, 62082684164458190567999459967, 2405195234525224724112302276711929089, 762399076229936058613587754015434541854738381
Offset: 0

Views

Author

N. J. A. Sloane, Oct 26 2018

Keywords

Crossrefs

Cf. A004103 (not necessarily connected nets), A004107 (self-dual), A320489 (connected nets).

Programs

Formula

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

Extensions

a(0)=1 prepended and terms a(7) and beyond from Andrew Howroyd, Jan 26 2020
Showing 1-3 of 3 results.