cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A054922 Number of connected unlabeled symmetric relations (graphs with loops) having n nodes such that complement is also connected.

Original entry on oeis.org

2, 0, 0, 10, 164, 2670, 56724, 1867860, 104538928, 10461483366, 1912179618740, 644464839239880, 402785011941549964, 468944407349226545614, 1021179521951204217530900, 4174755063830188009750183026
Offset: 1

Views

Author

N. J. A. Sloane, May 24 2000

Keywords

Crossrefs

Programs

  • 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 *)
  • 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<>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

Formula

a(n) = 2*A054921(n) - A000666(n).

Extensions

More terms from Vladeta Jovovic, Jul 17 2000
Showing 1-1 of 1 results.