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 A151879 #16 Jul 02 2024 15:06:42 %S A151879 1,1,1,2,8,52,528,8632,252928,15494032,2050181376,525675623520, %T A151879 239430803636224,189133678584246592,260786292437892272128, %U A151879 638374284463941710477184,2842966981002836533300953088,23866119110542723640161098330368,394851495657676102988098496313229312 %N A151879 Produced by same formula that gives A000568 (unlabeled tournaments), but with LCM instead of GCD in the exponent. %H A151879 Andrew Howroyd, <a href="/A151879/b151879.txt">Table of n, a(n) for n = 0..50</a> %F A151879 a(n) = Sum_{j} (1/(Product (k^(j_k) (j_k)!))) * 2^{t_j}, where j runs through all partitions of n into odd parts, say with j_1 parts of size 1, j_3 parts of size 3, etc., and t_j = (1/2)*[ Sum_{r=1..n, s=1..n} j_r j_s lcm(r,s) - Sum_{r} j_r ]. %t A151879 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 A151879 edges[v_] := Sum[Sum[LCM[v[[i]], v[[j]]], {j, 1, i - 1}], {i, 2, Length[v]} ] + Sum[Quotient[v[[i]], 2], {i, 1, Length[v]}]; %t A151879 oddp[v_] := (For[i = 1, i <= Length[v], i++, If[BitAnd[v[[i]], 1] == 0, Return[0]]]; 1); %t A151879 a[n_] := a[n] = (s = 0; Do[If[oddp[p] == 1, s += permcount[p]*2^edges[p]], {p, IntegerPartitions[n]}]; s/n!); (* _Jean-François Alcover_, Nov 13 2017, after _Andrew Howroyd_ *) %o A151879 (PARI) %o A151879 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 A151879 edges(v) = {sum(i=2, #v, sum(j=1, i-1, lcm(v[i], v[j]))) + sum(i=1, #v, v[i]\2)} %o A151879 oddp(v) = {for(i=1, #v, if(bitand(v[i], 1)==0, return(0))); 1} %o A151879 a(n) = {my(s=0); forpart(p=n, if(oddp(p), s+=permcount(p)*2^(edges(p)))); s/n!} \\ _Andrew Howroyd_, Feb 29 2020 %o A151879 (Python) %o A151879 from math import prod, lcm, factorial %o A151879 from fractions import Fraction %o A151879 from itertools import product %o A151879 from sympy.utilities.iterables import partitions %o A151879 def A151879(n): return int(sum(Fraction(1<<(sum(p[r]*p[s]*lcm(r,s) for r,s in product(p.keys(),repeat=2))-sum(p.values())>>1),prod(q**p[q]*factorial(p[q]) for q in p)) for p in partitions(n) if all(q&1 for q in p))) # _Chai Wah Wu_, Jul 01 2024 %K A151879 nonn %O A151879 0,4 %A A151879 _N. J. A. Sloane_, Jul 21 2009