OFFSET
0,4
COMMENTS
A digraph is (isomorphic to) a graph if every pair of points a, b joined by a directed edge (a,b) also has the reverse directed edge (b,a). A digraph which is not a graph is a digraph with at least one pair of points which have only one directed edge connecting them.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 0..60
EXAMPLE
a(2) = 1 because with two points a and b, either there are no edges connecting them, or there is one directed edge between them, or there is a bidirectional pair of edges between them; only the case with one directed edge is the unique 2-point digraph which is not a graph.
PROG
(Python)
from itertools import combinations
from math import prod, factorial, gcd
from fractions import Fraction
from sympy.utilities.iterables import partitions
def A127909(n): return int(sum(Fraction((1<<sum(p[r]*p[s]*gcd(r, s)<<1 for r, s in combinations(p.keys(), 2))+sum(r*(q*r-1) for q, r in p.items()))-(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))) # Chai Wah Wu, Jul 05 2024
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, Feb 06 2007
STATUS
approved