%I #14 Jan 06 2024 13:10:24
%S 1,1,5,45,809,28217,1914733,254409765,66628946641,34575388318705,
%T 35680013894626133,73392583417010454429,301348381381966079690489,
%U 2471956814761996896091805993,40530184362443281653842556898237,1328619783326799871943604598592805525
%N Number of graphs with loops spanning n labeled vertices.
%C The span of a graph is the union of its edges.
%H Andrew Howroyd, <a href="/A322661/b322661.txt">Table of n, a(n) for n = 0..50</a>
%F Exponential transform of A062740, if we assume A062740(1) = 1.
%F Inverse binomial transform of A006125(n+1) = 2^binomial(n+1,2).
%e The a(2) = 5 edge-sets:
%e {{1,2}}
%e {{1,1},{1,2}}
%e {{1,1},{2,2}}
%e {{1,2},{2,2}}
%e {{1,1},{1,2},{2,2}}
%t Table[Sum[(-1)^(n-k)*Binomial[n,k]*2^Binomial[k+1,2],{k,0,n}],{n,10}]
%t (* second program *)
%t Table[Select[Expand[Product[1+x[i]*x[j],{j,n},{i,j}]],And@@Table[!FreeQ[#,x[i]],{i,n}]&]/.x[_]->1,{n,7}]
%o (PARI) a(n) = sum(k=0, n, (-1)^(n-k)*binomial(n,k)*2^binomial(k+1,2)) \\ _Andrew Howroyd_, Jan 06 2024
%Y Cf. A000666, A006125, A006129 (loops not allowed), A054921, A062740, A116539, A320461, A322635, A048291 (for directed edgs).
%K nonn
%O 0,3
%A _Gus Wiseman_, Dec 22 2018