%I M4663 #33 Jul 09 2024 16:31:58
%S 1,1,9,165,24651,29522961,286646256675,21717897090413481,
%T 12980536689318626076840,62082697145168772833294318409,
%U 2405195296608025717214293025492960466,762399078635131851885116768114137369439908725
%N Number of self-dual nets with 2n nodes.
%C 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
%D 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.
%D R. W. Robinson, personal communication.
%D R. W. Robinson, Numerical implementation of graph counting algorithms, AGRC Grant, Math. Dept., Univ. Newcastle, Australia, 1976.
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H Andrew Howroyd, <a href="/A004107/b004107.txt">Table of n, a(n) for n = 0..40</a> (terms 1..13 from R. W. Robinson)
%H Frank Harary, Edgar M. Palmer, Robert W. Robinson, and Allen J. Schwenk, <a href="http://dx.doi.org/10.1002/jgt.3190010405">Enumeration of graphs with signed points and lines</a>, J. Graph Theory 1 (1977), no. 4, 295-308.
%H R. W. Robinson, <a href="/A000666/a000666_2.pdf">Notes - "A Present for Neil Sloane"</a>
%H R. W. Robinson, <a href="/A004102/a004102_1.pdf">Notes - computer printout</a>
%t 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];
%t 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]}];
%t a[n_] := Module[{s = 0}, Do[s += permcount[p]*3^edges[p], {p, IntegerPartitions[n]}]; s/n!];
%t Array[a, 12, 0] (* _Jean-François Alcover_, Aug 17 2019, after _Andrew Howroyd_ *)
%o (PARI)
%o 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}
%o 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)}
%o a(n) = {my(s=0); forpart(p=n, s+=permcount(p)*3^edges(p)); s/n!} \\ _Andrew Howroyd_, Sep 25 2018
%o (Python)
%o from itertools import combinations
%o from math import prod, gcd, factorial
%o from fractions import Fraction
%o from sympy.utilities.iterables import partitions
%o 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
%Y Cf. A004103, A004104, A004105, A004106.
%K nonn
%O 0,3
%A _N. J. A. Sloane_
%E a(0)=1 prepended by _Andrew Howroyd_, Sep 25 2018