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!)
A054922 Number of connected unlabeled symmetric relations (graphs with loops) having n nodes such that complement is also connected. 1
2, 0, 0, 10, 164, 2670, 56724, 1867860, 104538928, 10461483366, 1912179618740, 644464839239880, 402785011941549964, 468944407349226545614, 1021179521951204217530900, 4174755063830188009750183026 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
V. A. Liskovets, Some easily derivable sequences, J. Integer Sequences, 3 (2000), #00.2.2.
FORMULA
a(n) = 2*A054921(n) - A000666(n).
MATHEMATICA
A000666 = Cases[Import["https://oeis.org/A000666/b000666.txt", "Table"], {_, _}][[All, 2]];
A054921 = Cases[Import["https://oeis.org/A054921/b054921.txt", "Table"], {_, _}][[All, 2]];
a[n_] := 2*A054921[[n + 1]] - A000666[[n + 1]];
Array[a, 50] (* Jean-François Alcover, Aug 31 2019 *)
PROG
(Python)
from functools import lru_cache
from itertools import combinations
from math import prod, factorial, gcd
from fractions import Fraction
from sympy.utilities.iterables import partitions
from sympy import mobius, divisors
def A054922(n):
@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)+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(d)*c(n//d) for d in divisors(n, generator=True))//n<<1)-b(n) # Chai Wah Wu, Jul 10 2024
CROSSREFS
Sequence in context: A213704 A278099 A000171 * A289651 A342588 A302751
KEYWORD
nonn,easy,changed
AUTHOR
N. J. A. Sloane, May 24 2000
EXTENSIONS
More terms from Vladeta Jovovic, Jul 17 2000
STATUS
approved

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 July 11 06:29 EDT 2024. Contains 374216 sequences. (Running on oeis4.)