OFFSET
1,2
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..40
Rebekka Willenberg, Self-Complementary Graphs and Digraphs. In search of a natural bijection, 2017.
FORMULA
MATHEMATICA
Table[CoefficientList[PairGroupIndex[SymmetricGroup[n], s, Ordered]/.Table[s[i]->4, {i, 1, 2 Binomial[n, 2]}], x], {n, 1, 8}] (* Geoffrey Critzer, Oct 20 2012 *)
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];
edges[v_] := Sum[2*GCD[v[[i]], v[[j]]], {i, 2, Length[v]}, {j, 1, i - 1}] + Total[v - 1];
a[n_] := (s=0; Do[s += permcount[p]*4^edges[p], {p, IntegerPartitions[n]}]; s/n!);
Array[a, 15] (* Jean-François Alcover, Jul 08 2018, after Andrew Howroyd *)
PROG
(PARI)
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}
edges(v) = {sum(i=2, #v, sum(j=1, i-1, 2*gcd(v[i], v[j]))) + sum(i=1, #v, v[i]-1)}
a(n) = {my(s=0); forpart(p=n, s+=permcount(p)*4^edges(p)); s/n!} \\ Andrew Howroyd, Oct 22 2017
(Python)
from itertools import combinations
from math import prod, gcd, factorial
from fractions import Fraction
from sympy.utilities.iterables import partitions
def A053468(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())-s<<1), prod(q**r*factorial(r) for q, r in p.items())) for s, p in partitions(n, size=True))) # Chai Wah Wu, Jul 10 2024
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Vladeta Jovovic, Jan 13 2000
STATUS
approved