[go: up one dir, main page]

login
A004103
Number of nets on n unlabeled nodes.
(Formerly M1942)
7
1, 2, 9, 56, 705, 19548, 1419237, 278474976, 148192635483, 213558945249402, 836556995284293897, 8962975658381123937708, 264404516190234685662666051, 21610417954162750247842392794292, 4921335335427778307286708119839406529, 3138313838161414849743136458064895837170596
OFFSET
0,2
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).
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..50 (terms 1..22 from R. W. Robinson)
Frank Harary, Edgar M. Palmer, Robert W. Robinson, Allen J. Schwenk, Enumeration of graphs with signed points and lines, J. Graph Theory 1 (1977), no. 4, 295-308.
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 *)
PROG
(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()))<<s, prod(q**r*factorial(r) for q, r in p.items())) for s, p in partitions(n, size=True))) # Chai Wah Wu, Jul 09 2024
CROSSREFS
Cf. A004102 (signed edges only), A000666 (signed vertices only).
Cf. A004107.
Sequence in context: A277482 A274393 A371196 * A295775 A223381 A175896
KEYWORD
nonn
EXTENSIONS
a(0)=1 prepended and a(13)-a(14) added by Andrew Howroyd, Sep 25 2018
STATUS
approved