[go: up one dir, main page]

login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A367142 Number of connected simple graphs on n unlabeled vertices without universal vertices. 2

%I #21 Jul 05 2024 09:34:34

%S 1,0,0,0,2,10,78,697,10073,248734,11441903,994695397,163040832612,

%T 50170816696627,28952985431480109,31368326987104006472,

%U 63938133627255371867509,245807830666379498961633640,1787085789384745555957516856804,24634233851674722043622102881490796

%N Number of connected simple graphs on n unlabeled vertices without universal vertices.

%C A universal vertex is adjacent to every other vertex.

%H Chai Wah Wu, <a href="/A367142/b367142.txt">Table of n, a(n) for n = 0..87</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Vertex_(graph_theory)">Vertex_(graph_theory)</a>.

%F a(n) = A001349(n) - A000088(n-1) for n > 0.

%F a(n) = Sum_{k=2..n-2} A332760(n,k) for n > 0.

%e The a(4) = 2 graphs are P_4 (path graph) and C_4 (cycle graph).

%o (Python)

%o from functools import lru_cache

%o from itertools import combinations

%o from fractions import Fraction

%o from math import prod, gcd, factorial

%o from sympy import mobius, divisors

%o from sympy.utilities.iterables import partitions

%o def A367142(n):

%o if n == 0: return 1

%o @lru_cache(maxsize=None)

%o 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)))

%o @lru_cache(maxsize=None)

%o def c(n): return n*b(n)-sum(c(k)*b(n-k) for k in range(1,n))

%o return sum(mobius(n//d)*c(d) for d in divisors(n,generator=True))//n-b(n-1) # _Chai Wah Wu_, Jul 03 2024

%Y A002494 is the not necessarily connected case.

%Y Cf. A000088, A001349, A332760, A367143.

%K nonn

%O 0,5

%A _Andrew Howroyd_, Nov 06 2023

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 30 19:27 EDT 2024. Contains 375545 sequences. (Running on oeis4.)