[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!)
A054918 Number of connected unlabeled digraphs with n nodes such that complement is also connected. 1
1, 1, 10, 180, 9120, 1520742, 878908844, 1791588717764, 13024366540532952, 341234368845828951004, 32522226812040344643993088, 11366680383641301437820379768750, 14669062959091969068110415719779627436 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
V. A. Liskovets, Some easily derivable sequences, J. Integer Sequences, 3 (2000), #00.2.2.
FORMULA
a(n) = 2*A003085(n) - A000273(n).
MATHEMATICA
A000273 = Cases[Import["https://oeis.org/A000273/b000273.txt", "Table"], {_, _}][[All, 2]];
A003085 = Cases[Import["https://oeis.org/A003085/b003085.txt", "Table"], {_, _}][[All, 2]];
a[n_] := 2*A003085[[n]] - A000273[[n + 1]];
Array[a, 50] (* Jean-François Alcover, Aug 31 2019 *)
PROG
(Python)
from functools import lru_cache
from itertools import product, combinations
from fractions import Fraction
from math import prod, gcd, factorial
from sympy import mobius, divisors
from sympy.utilities.iterables import partitions
def A054918(n):
@lru_cache(maxsize=None)
def b(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()), 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<<1)-b(n) # Chai Wah Wu, Jul 05 2024
CROSSREFS
Sequence in context: A034908 A030048 A318796 * A095807 A064092 A171513
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 24 2000
EXTENSIONS
More terms from Vladeta Jovovic, Jul 19 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 August 29 11:13 EDT 2024. Contains 375512 sequences. (Running on oeis4.)