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.
%I A054922 #25 Jul 10 2024 15:02:55 %S A054922 2,0,0,10,164,2670,56724,1867860,104538928,10461483366,1912179618740, %T A054922 644464839239880,402785011941549964,468944407349226545614, %U A054922 1021179521951204217530900,4174755063830188009750183026 %N A054922 Number of connected unlabeled symmetric relations (graphs with loops) having n nodes such that complement is also connected. %H A054922 Andrew Howroyd, <a href="/A054922/b054922.txt">Table of n, a(n) for n = 1..50</a> %H A054922 V. A. Liskovets, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL3/LISK/Derseq.html">Some easily derivable sequences</a>, J. Integer Sequences, 3 (2000), #00.2.2. %F A054922 a(n) = 2*A054921(n) - A000666(n). %t A054922 A000666 = Cases[Import["https://oeis.org/A000666/b000666.txt", "Table"], {_, _}][[All, 2]]; %t A054922 A054921 = Cases[Import["https://oeis.org/A054921/b054921.txt", "Table"], {_, _}][[All, 2]]; %t A054922 a[n_] := 2*A054921[[n + 1]] - A000666[[n + 1]]; %t A054922 Array[a, 50] (* _Jean-François Alcover_, Aug 31 2019 *) %o A054922 (Python) %o A054922 from functools import lru_cache %o A054922 from itertools import combinations %o A054922 from math import prod, factorial, gcd %o A054922 from fractions import Fraction %o A054922 from sympy.utilities.iterables import partitions %o A054922 from sympy import mobius, divisors %o A054922 def A054922(n): %o A054922 @lru_cache(maxsize=None) %o A054922 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))) %o A054922 @lru_cache(maxsize=None) %o A054922 def c(n): return n*b(n)-sum(c(k)*b(n-k) for k in range(1,n)) %o A054922 return (sum(mobius(d)*c(n//d) for d in divisors(n,generator=True))//n<<1)-b(n) # _Chai Wah Wu_, Jul 10 2024 %Y A054922 Cf. A000666, A054291. %K A054922 nonn,easy %O A054922 1,1 %A A054922 _N. J. A. Sloane_, May 24 2000 %E A054922 More terms from _Vladeta Jovovic_, Jul 17 2000