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.

A126122 Number of edge-rooted unlabeled graphs on n nodes.

This page as a plain text file.
%I A126122 #29 Apr 15 2021 20:19:24
%S A126122 0,1,3,14,74,572,6564,125120,4147832,247183688,26814414976,
%T A126122 5327509126272,1946813194004224,1313879013920844480,
%U A126122 1644521424392726492800,3833402238753872010743808,16708198671847617602943683072,136682601082422255664288717142080
%N A126122 Number of edge-rooted unlabeled graphs on n nodes.
%C A126122 In other words, number of unlabeled graphs on n nodes with a marked edge.
%D A126122 F. Harary and E. M. Palmer, Graphical Enumeration, Academic Press, NY, 1973.
%H A126122 Vladeta Jovovic, <a href="/A126122/b126122.txt">Table of n, a(n) for n = 1..40</a>
%e A126122 a(2)=1: the tree with 2 nodes and a rooted edge. a(3)=3: (i) the linear tree with one of the two edges rooted, (ii) the triangle graph with one of the three edges rooted, (iii) the disconnected graph with a single disconnected node and a tree with 2 nodes and a marked edge. - _R. J. Mathar_, May 01 2018
%t A126122 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 A126122 edges[v_] := (Sum[GCD[v[[i]], v[[j]]], {i, 2, Length@v}, {j, 1, i - 1}] + Total[Quotient[v, 2]]);
%t A126122 cross[u_, v_] := Sum[GCD[u[[i]], v[[j]]], {i, 1, Length@u}, {j, 1, Length@v}];
%t A126122 a[n_] := If[n < 2, 0, s = 0; Do[s += permcount[p]*(2^(edges[p])*(2^cross[{1, 1}, p] + 2^cross[{2}, p])), {p, IntegerPartitions[n - 2]}]; s/(2(n - 2)!)];
%t A126122 Array[a, 20] (* _Jean-François Alcover_, Jul 07 2018, after _Andrew Howroyd_ *)
%o A126122 (PARI)
%o A126122 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 A126122 edges(v) = {sum(i=2, #v, sum(j=1, i-1, gcd(v[i],v[j]))) + sum(i=1, #v, v[i]\2)}
%o A126122 cross(u,v) = {sum(i=1, #u, sum(j=1, #v, gcd(u[i],v[j])))}
%o A126122 a(n) = {if(n<2, 0, my(s=0); forpart(p=n-2, s+=permcount(p)*(2^(edges(p))*(2^cross([1,1],p) + 2^cross([2],p)))); s/(2*(n-2)!))} \\ _Andrew Howroyd_, May 03 2018
%Y A126122 Row sums of A126123.
%Y A126122 Cf. A000088, A000666, A303829.
%K A126122 nonn
%O A126122 1,3
%A A126122 _Vladeta Jovovic_, Mar 07 2007