login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A053513 Number of 2-multigraphs with loops on n nodes. 3
3, 18, 165, 3132, 137268, 15548004, 4679446950, 3771927027864, 8186669639820081, 48184182482857319682, 774912347548961791914585, 34299111628183837790980740312, 4205499936656520106909422649497294 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

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

Andrew Howroyd, Table of n, a(n) for n = 1..50

MATHEMATICA

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[GCD[v[[i]], v[[j]]], {i, 2, Length[v]}, {j, 1, i - 1}] + Total[Quotient[v, 2] + 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, gcd(v[i], v[j]))) + sum(i=1, #v, v[i]\2 + 1)}

a(n) = {my(s=0); forpart(p=n, s+=permcount(p)*3^edges(p)); s/n!} \\ Andrew Howroyd, Oct 22 2017

CROSSREFS

Cf. A000666, A004102, A053514.

Sequence in context: A302585 A107403 A319938 * A138211 A052668 A224788

Adjacent sequences:  A053510 A053511 A053512 * A053514 A053515 A053516

KEYWORD

easy,nonn

AUTHOR

Vladeta Jovovic, Jan 14 2000

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 6 08:22 EDT 2020. Contains 335476 sequences. (Running on oeis4.)