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!)
A053467 Number of directed 2-multigraphs on n nodes. 5
1, 6, 138, 22815, 29197989, 286181094816, 21712697070199704, 12980080058620326927885, 62082385554465497895132149640, 2405193620328895144597707267893468286, 762399006478986275307113015668690102196187810 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
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).
LINKS
MATHEMATICA
Table[CycleIndex[PairGroup[SymmetricGroup[n], Ordered], t] /.Table[t[i] -> 1 + x^i + y^i, {i, 1, n^2}] /. {x -> 1, y -> 1}, {n, 1, 7}] (* Geoffrey Critzer, Mar 08 2011 *)
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]*3^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)*3^edges(p)); s/n!} \\ Andrew Howroyd, Oct 22 2017
CROSSREFS
Sequence in context: A307353 A366227 A155558 * A288557 A288565 A090944
KEYWORD
easy,nonn
AUTHOR
Vladeta Jovovic, Jan 13 2000
EXTENSIONS
a(11) from Andrew Howroyd, Oct 22 2017
STATUS
approved

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 18 08:27 EDT 2024. Contains 371769 sequences. (Running on oeis4.)