login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A367142
Number of connected simple graphs on n unlabeled vertices without universal vertices.
2
1, 0, 0, 0, 2, 10, 78, 697, 10073, 248734, 11441903, 994695397, 163040832612, 50170816696627, 28952985431480109, 31368326987104006472, 63938133627255371867509, 245807830666379498961633640, 1787085789384745555957516856804, 24634233851674722043622102881490796
OFFSET
0,5
COMMENTS
A universal vertex is adjacent to every other vertex.
LINKS
FORMULA
a(n) = A001349(n) - A000088(n-1) for n > 0.
a(n) = Sum_{k=2..n-2} A332760(n,k) for n > 0.
EXAMPLE
The a(4) = 2 graphs are P_4 (path graph) and C_4 (cycle graph).
PROG
(Python)
from functools import lru_cache
from itertools import combinations
from fractions import Fraction
from math import prod, gcd, factorial
from sympy import mobius, divisors
from sympy.utilities.iterables import partitions
def A367142(n):
if n == 0: return 1
@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))
return sum(mobius(n//d)*c(d) for d in divisors(n, generator=True))//n-b(n-1) # Chai Wah Wu, Jul 03 2024
CROSSREFS
A002494 is the not necessarily connected case.
Sequence in context: A134980 A355471 A240599 * A212381 A098692 A300994
KEYWORD
nonn
AUTHOR
Andrew Howroyd, Nov 06 2023
STATUS
approved