OFFSET
0,3
COMMENTS
The span of a graph is the union of its edges. The not necessarily spanning case is A000666.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..80
FORMULA
First differences of A000666.
MATHEMATICA
Table[Sum[2^PermutationCycles[Ordering[Map[Sort, Select[Tuples[Range[n], 2], OrderedQ]/.Rule@@@Table[{i, prm[[i]]}, {i, n}], {1}]], Length], {prm, Permutations[Range[n]]}]/n!, {n, 0, 8}]//Differences (* Mathematica 8.0+ *)
PROG
(Python)
from itertools import combinations
from math import prod, factorial, gcd
from fractions import Fraction
from sympy.utilities.iterables import partitions
def A322700(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)+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))-sum(Fraction(1<<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-1))) if n else 1 # Chai Wah Wu, Jul 14 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Dec 23 2018
STATUS
approved