login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A053516 Number of directed 4-multigraphs with loops on n nodes. 5

%I #13 Jul 08 2018 11:09:56

%S 5,325,327125,6360324375,2483590604688125,20211024423069510171875,

%T 3524517841661451239027963515625,

%U 13444967478414031326768049544880110156250,1139744010069698074379093986222808985702884783203125

%N Number of directed 4-multigraphs with loops on n nodes.

%H Andrew Howroyd, <a href="/A053516/b053516.txt">Table of n, a(n) for n = 1..30</a>

%t 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 edges[v_] := Sum[2*GCD[v[[i]], v[[j]]], {i, 2, Length[v]}, {j, 1, i - 1}] + Total[v];

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

%t Array[a, 15] (* _Jean-François Alcover_, Jul 08 2018, 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) = {sum(i=2, #v, sum(j=1, i-1, 2*gcd(v[i],v[j]))) + sum(i=1, #v, v[i])}

%o a(n) = {my(s=0); forpart(p=n, s+=permcount(p)*5^edges(p)); s/n!} \\ _Andrew Howroyd_, Oct 22 2017

%Y Cf. A000595, A004105, A001374.

%K easy,nonn

%O 1,1

%A _Vladeta Jovovic_, Jan 14 2000

%E a(9) from _Andrew Howroyd_, Oct 22 2017

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)