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!)
A340022 Number of graphs with vertices labeled with positive integers summing to n. 4

%I #12 Jan 06 2021 13:03:57

%S 1,1,3,7,22,71,319,1939,19790,377259,14603435,1144417513,176665721300,

%T 52525450429119,29719386740326525,31836493683553082697,

%U 64474640381705842520802,246962703426353769596309789,1791765285568042699367722904797,24670014908867411635732865067513309

%N Number of graphs with vertices labeled with positive integers summing to n.

%H Andrew Howroyd, <a href="/A340022/b340022.txt">Table of n, a(n) for n = 0..50</a>

%t 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 edges[v_] := Sum[GCD[v[[i]], v[[j]]], {i, 2, Length[v]}, {j, 1, i - 1}] + Total[Quotient[v, 2]];

%t seq[n_] := 1 + Sum[s = 0; Do[s += permcount[p]*2^edges[p]*x^k/Product[1 - x^p[[j]] + O[x]^(n-k+1), {j, 1, Length[p]}],{p, IntegerPartitions[k]}]; s/k!, {k, 1, n}] // CoefficientList[#, x]&;

%t seq[19] (* _Jean-François Alcover_, Jan 06 2021, after _Andrew Howroyd_ *)

%o (PARI)

%o 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 edges(v) = {sum(i=2, #v, sum(j=1, i-1, gcd(v[i], v[j]))) + sum(i=1, #v, v[i]\2)}

%o seq(n) = {Vec(1+sum(k=1, n, my(s=0); forpart(p=k, s+=permcount(p) * 2^edges(p) * x^k/prod(j=1, #p, 1 - x^p[j] + O(x^(n-k+1)))); s/k!))}

%Y Cf. A000088, A337716, A340023, A340024, A340025.

%K nonn

%O 0,3

%A _Andrew Howroyd_, Jan 01 2021

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 July 22 17:20 EDT 2024. Contains 374540 sequences. (Running on oeis4.)