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 A001374 M3717 N1519 #37 Jul 10 2024 14:28:18 %S A001374 4,136,44224,179228736,9383939974144,6558936236286040064, %T A001374 62879572771326489528942592,8439543710699844562674685252214784, %U A001374 16110027001555070629022725866559372785352704,442829046878106126159584032189649757399796014050181120 %N A001374 Number of relational systems on n nodes. Also number of directed 3-multigraphs with loops on n nodes. %D A001374 W. Oberschelp, "Strukturzahlen in endlichen Relationssystemen", in Contributions to Mathematical Logic (Proceedings 1966 Hanover Colloquium), pp. 199-213, North-Holland Publ., Amsterdam, 1968. %D A001374 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence). %D A001374 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A001374 Andrew Howroyd, <a href="/A001374/b001374.txt">Table of n, a(n) for n = 1..40</a> %H A001374 W. Oberschelp, <a href="/A000662/a000662.pdf"> Strukturzahlen in endlichen Relationssystemen</a>, in Contributions to Mathematical Logic (Proceedings 1966 Hanover Colloquium), pp. 199-213, North-Holland Publ., Amsterdam, 1968. [Annotated scanned copy] %t A001374 permcount[v_] := Module[{m = 1, s = 0, k = 0, t}, For[i = 1, i <= Length[v], i++, t = v[[i]]; k = If[i > 1 && t == v[[i - 1]], k + 1, 1]; m *= t*k; s += t]; s!/m]; %t A001374 edges[v_] := Sum[2*GCD[v[[i]], v[[j]]], {i, 2, Length[v]}, {j, 1, i - 1}] + Total[v]; %t A001374 a[n_] := (s=0; Do[s += permcount[p]*4^edges[p], {p, IntegerPartitions[n]}]; s/n!); %t A001374 Array[a, 15] (* _Jean-François Alcover_, Jul 08 2018, after _Andrew Howroyd_ *) %o A001374 (PARI) %o A001374 permcount(v) = {my(m=1,s=0,k=0,t); for(i=1,#v,t=v[i]; k=if(i>1&&t==v[i-1],k+1,1); m*=t*k;s+=t); s!/m} %o A001374 edges(v) = {sum(i=2, #v, sum(j=1, i-1, 2*gcd(v[i],v[j]))) + sum(i=1, #v, v[i])} %o A001374 a(n) = {my(s=0); forpart(p=n, s+=permcount(p)*4^edges(p)); s/n!} \\ _Andrew Howroyd_, Oct 22 2017 %o A001374 (Python) %o A001374 from itertools import combinations %o A001374 from math import prod, gcd, factorial %o A001374 from fractions import Fraction %o A001374 from sympy.utilities.iterables import partitions %o A001374 def A001374(n): return int(sum(Fraction(1<<((sum(p[r]*p[s]*gcd(r,s) for r,s in combinations(p.keys(),2))<<1)+sum(q*r**2 for q, r in p.items())<<1),prod(q**r*factorial(r) for q, r in p.items())) for p in partitions(n))) # _Chai Wah Wu_, Jul 10 2024 %Y A001374 Cf. A000595, A004105, A053468, A053516. %K A001374 nonn,nice,easy %O A001374 1,1 %A A001374 _N. J. A. Sloane_ %E A001374 More terms from _Vladeta Jovovic_, Jan 14 2000