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!)
A199840 Triangle read by rows: T(n,k) is the number of 2-multigraphs on n nodes having exactly k edges, with n >= 1 and 0 <= k <= n*(n-1). 1
1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 3, 5, 8, 9, 12, 9, 8, 5, 3, 1, 1, 1, 1, 3, 6, 14, 24, 43, 62, 87, 100, 110, 100, 87, 62, 43, 24, 14, 6, 3, 1, 1, 1, 1, 3, 7, 18, 40, 91, 180, 352, 616, 1006, 1483, 2036, 2522, 2891, 3012, 2891, 2522, 2036, 1483, 1006, 616, 352, 180, 91, 40, 18, 7, 3, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,7
COMMENTS
Here a 2-multigraph is an unlabeled graph with at most 2 edges connecting any vertex pair with no self loops allowed.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..2680 (first 20 rows)
EXAMPLE
Triangle begins:
1;
1, 1, 1;
1, 1, 2, 2, 2, 1, 1;
1, 1, 3, 5, 8, 9, 12, 9, 8, 5, 3, 1, 1;
...
MATHEMATICA
Table[CoefficientList[Expand[PairGroupIndex[SymmetricGroup[n], s] /. Table[s[i]->1+x^i+x^(2i), {i, 1, Binomial[n, 2]}]], x], {n, 1, 6}]
(* Second program: *)
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_, t_] := Product[g = GCD[v[[i]], v[[j]] ]; t[v[[i]]*v[[j]]/g]^g, {i, 2, Length[v]}, {j, 1, i - 1}]*Product[c = v[[i]]; t[c]^Quotient[c - 1, 2]*If[OddQ[c], 1, t[c/2]], {i, 1, Length[v]}];
row[n_] := Module[{s=0}, Do[s += permcount[p]*edges[p, 1 + x^# + x^(2#)&], {p, IntegerPartitions[n]}]; s/n!] // Expand // CoefficientList[#, x]&;
Array[row, 6] // Flatten (* Jean-François Alcover, Jan 08 2021, 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, t) = {prod(i=2, #v, prod(j=1, i-1, my(g=gcd(v[i], v[j])); t(v[i]*v[j]/g)^g )) * prod(i=1, #v, my(c=v[i]); t(c)^((c-1)\2)*if(c%2, 1, t(c/2)))}
Row(n) = {my(s=0); forpart(p=n, s+=permcount(p)*edges(p, i->1+x^i+(x^2)^i)); Vecrev(s/n!)}
{ for(n=1, 6, print(Row(n))) } \\ Andrew Howroyd, Nov 07 2019
CROSSREFS
Row sums are A004102.
Cf. A008406.
Sequence in context: A232439 A346118 A309797 * A126067 A327490 A346529
KEYWORD
nonn,tabf
AUTHOR
Geoffrey Critzer, Nov 11 2011
EXTENSIONS
Terms a(46) and beyond from Andrew Howroyd, Nov 07 2019
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 25 04:42 EDT 2024. Contains 371964 sequences. (Running on oeis4.)