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”).

Number of self-complementary directed 2-multigraphs on n nodes.
3

%I #15 Sep 12 2019 09:10:48

%S 1,2,14,159,7629,599456,226066304,139178815861,410179495378288,

%T 2055126126323159298,48234291396964332998082,

%U 2016523952125103590736221923,382812826011951187177138562992638,135681830960694827549160289095792266106

%N Number of self-complementary directed 2-multigraphs on n nodes.

%C A 2-multigraph is similar to an ordinary graph except there are 0, 1 or 2 edges between any two nodes (self-loops are not allowed).

%H Andrew Howroyd, <a href="/A052112/b052112.txt">Table of n, a(n) for n = 1..50</a>

%t 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];

%t edges[v_List] := 2 Sum[Sum[If[EvenQ[v[[i]] v[[j]]], GCD[v[[i]], v[[j]]], 0], {j, 1, i - 1}], {i, 2, Length[v]}] + Sum[If[EvenQ[v[[i]]], v[[i]] - 1, 0], {i, 1, Length[v]}];

%t a[n_] := Module[{s = 0}, Do[s += permcount[p]*3^edges[p], {p, IntegerPartitions[n]}]; s/n!];

%t Array[a, 25] (* _Jean-François Alcover_, Sep 12 2019, after _Andrew Howroyd_ *)

%o (PARI)

%o 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 edges(v) = {2*sum(i=2, #v, sum(j=1, i-1, if(v[i]*v[j]%2==0, gcd(v[i],v[j])))) + sum(i=1, #v, if(v[i]%2==0, v[i]-1))}

%o a(n) = {my(s=0); forpart(p=n, s+=permcount(p)*3^edges(p)); s/n!} \\ _Andrew Howroyd_, Sep 16 2018

%Y Cf. A053467, A003086, A053588.

%K nonn

%O 1,2

%A _Vladeta Jovovic_, Jan 21 2000

%E Terms a(14) and beyond from _Andrew Howroyd_, Sep 16 2018