A322700 Number of unlabeled graphs with loops spanning n vertices.
1, 1, 4, 14, 70, 454, 4552, 74168, 2129348, 111535148, 10812483376, 1945437208224, 650378721156736, 404749938336404704, 470163239887698967104, 1022592854829028311090816, 4177826139658552046627175072, 32163829440870460348768023969632
Offset: 0
Keywords
Links
- Andrew Howroyd, Table of n, a(n) for n = 0..80
- Gus Wiseman, Non-isomorphic representatives of the a(4) = 70 spanning graphs with loops.
Programs
-
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+ *)
-
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<
>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< >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
Formula
First differences of A000666.
Comments