cp's OEIS Frontend

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.

A053468 Number of directed 3-multigraphs on n nodes.

This page as a plain text file.
%I A053468 #25 Jul 10 2024 15:03:11
%S A053468 1,10,720,703760,9168331776,1601371799340544,3837878966366932639744,
%T A053468 128777257564337108286016980992,
%U A053468 61454877497308462618188532330410573824,422314689395950135433730499958070655419345928192
%N A053468 Number of directed 3-multigraphs on n nodes.
%H A053468 Andrew Howroyd, <a href="/A053468/b053468.txt">Table of n, a(n) for n = 1..40</a>
%H A053468 Rebekka Willenberg, <a href="https://www.math.ru.nl/~bosma/Students/RebekkaWillenbergBSc.pdf">Self-Complementary Graphs and Digraphs. In search of a natural bijection</a>, 2017.
%F A053468 a(n) = A003086(2n) = A000171(4n). - _Andrey Zabolotskiy_, Feb 21 2021
%t A053468 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 *)
%t A053468 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 A053468 edges[v_] := Sum[2*GCD[v[[i]], v[[j]]], {i, 2, Length[v]}, {j, 1, i - 1}] + Total[v - 1];
%t A053468 a[n_] := (s=0; Do[s += permcount[p]*4^edges[p], {p, IntegerPartitions[n]}]; s/n!);
%t A053468 Array[a, 15] (* _Jean-François Alcover_, Jul 08 2018, after _Andrew Howroyd_ *)
%o A053468 (PARI)
%o A053468 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 A053468 edges(v) = {sum(i=2, #v, sum(j=1, i-1, 2*gcd(v[i],v[j]))) + sum(i=1, #v, v[i]-1)}
%o A053468 a(n) = {my(s=0); forpart(p=n, s+=permcount(p)*4^edges(p)); s/n!} \\ _Andrew Howroyd_, Oct 22 2017
%o A053468 (Python)
%o A053468 from itertools import combinations
%o A053468 from math import prod, gcd, factorial
%o A053468 from fractions import Fraction
%o A053468 from sympy.utilities.iterables import partitions
%o A053468 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
%Y A053468 Cf. A000273, A053467, A000171, A003086.
%K A053468 easy,nonn
%O A053468 1,2
%A A053468 _Vladeta Jovovic_, Jan 13 2000