OFFSET
0,4
COMMENTS
"Component" means there are no edges from a node of one component to any node of the other component.
Each of the 2 components may be the empty graph with 0 nodes. That means the graph has only one "visible" component in these cases.
Each of the 2 components must be a connected graph (see A001349). (The empty graph has all properties and is a connected graph.)
The graphs of the 2 components must not be the same (not be isomorphic).
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..75
EXAMPLE
a(4)=8 = 1*6 + 1*2 where 1*6=A001349(0)*A001349(4) counts graphs with an empty component and a component with 4 nodes, where 1*2 = A001349(1)*A001349(3) counts graphs with a component of 1 node and a component of 3 nodes. There is no contribution from a component of 2 nodes and another component of 2 nodes (both components were isomorphic in that case).
MATHEMATICA
terms = 20;
mob[m_, n_] := If[Mod[m, n] == 0, MoebiusMu[m/n], 0];
EULERi[b_] := Module[{a, c, i, d}, c = {}; For[i = 1, i <= Length[b], i++, c = Append[c, i*b[[i]] - Sum[c[[d]]*b[[i - d]], {d, 1, i - 1}]]]; a = {}; For[i = 1, i <= Length[b], i++, a = Append[a, (1/i)*Sum[mob[i, d]*c[[d]], {d, 1, i}]]]; Return[a]];
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]];
a88[n_] := Module[{s = 0}, Do[s += permcount[p]*2^edges[p], {p, IntegerPartitions[n]}]; s/n!];
A[x_] = Join[{1}, EULERi[Array[a88, terms]]].x^Range[0, terms];
(A[x]^2 - A[x^2])/2 + O[x]^terms // CoefficientList[#, x]& (* Jean-François Alcover, Jan 31 2020, after Andrew Howroyd in A001349 *)
PROG
(Python)
from functools import lru_cache
from itertools import combinations
from fractions import Fraction
from math import prod, gcd, factorial, comb
from sympy import mobius, divisors
from sympy.utilities.iterables import partitions
def A275166(n):
@lru_cache(maxsize=None)
def b(n): return int(sum(Fraction(1<<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)))
@lru_cache(maxsize=None)
def c(n): return n*b(n)-sum(c(k)*b(n-k) for k in range(1, n))
@lru_cache(maxsize=None)
def d(n): return sum(mobius(n//d)*c(d) for d in divisors(n, generator=True))//n if n else 1
return sum(d(i)*d(n-i) for i in range(n+1>>1)) + (0 if n&1 else comb(d(n>>1), 2)) # Chai Wah Wu, Jul 03 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
R. J. Mathar, Jul 18 2016
STATUS
approved