login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A052151
Number of self-complementary directed 3-multigraphs on n nodes.
1
1, 2, 32, 528, 131328, 22377984, 91628068864, 187650529822720, 12297831583666176000, 322380224569805856440320, 338040160454396241027914530816, 118153599638221082814732598131032064, 1982288462105132553530631056140022239461376
OFFSET
1,2
LINKS
MATHEMATICA
permcount[v_List] := 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_List] := 4 Sum[Sum[GCD[v[[i]], v[[j]]], {j, 1, i - 1}], {i, 2, Length[v]}] + Sum[2 v[[i]] - 1, {i, 1, Length[v]}];
a[n_] := Module[{s = 0}, Do[s += permcount[2 p]*4^edges[p]*If[OddQ[n], n*16^Length[p], 1], {p, IntegerPartitions[Quotient[n, 2]]}]; s/n!];
Array[a, 25] (* Jean-François Alcover, Sep 12 2019, 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) = {4*sum(i=2, #v, sum(j=1, i-1, gcd(v[i], v[j]))) + sum(i=1, #v, 2*v[i]-1)}
a(n) = {my(s=0); forpart(p=n\2, s+=permcount(2*Vec(p))*4^edges(p)*if(n%2, n*16^#p, 1)); s/n!} \\ Andrew Howroyd, Sep 17 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladeta Jovovic, Jan 24 2000
EXTENSIONS
Terms a(13) and beyond from Andrew Howroyd, Sep 17 2018
STATUS
approved