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.

Showing 1-4 of 4 results.

A304074 Number of simple connected graphs with n nodes rooted at a pair of distinguished vertices.

Original entry on oeis.org

0, 1, 4, 23, 162, 1549, 21090, 446061, 15673518, 961338288, 105752617892, 21155707801451, 7757777336382702, 5245054939576054088, 6571185585793205495484, 15325133281701584879975433, 66813349775478836190531605234, 546646811841381587823502759339055
Offset: 1

Views

Author

Brendan McKay, May 05 2018

Keywords

Examples

			a(3)=4: one choice to mark two roots in the triangular graph; one choice to mark the two leaves in the linear graph; two choices to mark the center node and a leave (1st root in the center or 2nd root in the center) in the linear graph.
		

Crossrefs

Cf. A001349 (not rooted), A303831 (vertices not distinguished), A304070 (not necessarily connected).

Programs

  • 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)}
    cross(u, v) = {sum(i=1, #u, sum(j=1, #v, gcd(u[i], v[j])))}
    S(n, r)={my(t=#r+1); vector(n+1, n, if(nAndrew Howroyd, Sep 07 2019

Formula

a(n) = A304072(n) + A304073(n).
G.f.: 2*B(x)/G(x) - (x*C(x)/G(x))^2, where B(x) is the g.f. of A304069, C(x) is the g.f. of A000666 and G(x) is the g.f. of A000088. - Andrew Howroyd, Sep 07 2019

Extensions

Terms a(13) and beyond from Andrew Howroyd, Sep 07 2019

A304069 Number of simple graphs on n vertices rooted at one oriented edge.

Original entry on oeis.org

0, 1, 4, 20, 120, 996, 12208, 241520, 8171936, 491317640, 53489987584, 10642774095040, 3891541970165760, 2627082058057474240, 3288629181834544457216, 7666328470407977450185984, 33415367571344085375628748800, 273361007807597539567353971109952
Offset: 1

Views

Author

Brendan McKay, May 05 2018

Keywords

Comments

This is also the number of simple graphs rooted at an oriented non-edge.
The graphs do not need to be connected here; see A304072 for the connected graphs.

Examples

			a(3)=4: no contribution from the graph with 3 isolated nodes. 1 case of the connected graph with 2 nodes and an isolated node. 2 cases of the linear graph with 3 nodes (orientation either towards or away from the middle node). 1 case of the triangular graph.
		

Crossrefs

Cf. A000088 (not rooted).

Programs

  • 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[#, 2]& /@ v];
    a[n_] := If[n < 2, 0, s = 0; Do[s += permcount[p]*(2^(2*Length[p] + edges[p])), {p, IntegerPartitions[n - 2]}]; s/(n - 2)!];
    Array[a, 18] (* Jean-François Alcover, Jul 03 2018, after Andrew Howroyd *)
  • 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)}
    a(n)= {if(n<2, 0, my(s=0); forpart(p=n-2, s+=permcount(p)*(2^(2*#p+edges(p)))); s/(n-2)!)} \\ Andrew Howroyd, May 06 2018

Formula

2*a(n) = A304070(n).

Extensions

Terms a(13) and beyond from Andrew Howroyd, May 06 2018

A339044 Number of unlabeled connected simple graphs with n edges rooted at one oriented edge.

Original entry on oeis.org

1, 2, 6, 18, 57, 188, 651, 2336, 8719, 33741, 135185, 559908, 2394326, 10557283, 47943126, 223987316, 1075455181, 5301593544, 26807904317, 138924912857, 737220195148, 4002876571636, 22221898966507, 126042573704637, 729944250603862, 4313430995825272
Offset: 1

Views

Author

Andrew Howroyd, Nov 21 2020

Keywords

Crossrefs

Programs

  • PARI
    \\ See A339063 for G.
    seq(n)={my(A=O(x*x^n)); Vec(G(2*n, x+A, [1, 1])/G(2*n, x+A, [])/(1+x))}

Formula

G.f.: x*f(x)/((1+x)*g(x)) where f(x) is the g.f. of A339063 and g(x) is the g.f. of A000664.

A304073 Number of simple connected graphs with n nodes rooted at one oriented non-edge.

Original entry on oeis.org

0, 0, 1, 8, 67, 701, 10047, 218083, 7758105, 478466565, 52762737260, 10566937121191, 3876933205880431, 2621875289142578194, 3285187439267316978728, 7662096100649423384254265, 33405651855362295512020765765, 273319227135047244053866187609854
Offset: 1

Views

Author

Brendan McKay, May 05 2018

Keywords

Examples

			a(3)=1: no contribution from the triangle graph; one case of joining the leaves of the linear graph.
a(4)=8: we start from the 6 cases of non-oriented non-edges of A304071 and note two geometries where the orientation makes a difference: for the triangular graph with a protruding edge the orientation matters (to or from the leaf), and also for the linear graph with 4 nodes (to or from the leaf).
		

Crossrefs

Cf. A001349 (not rooted), A304069 (not necessarily connected).

Programs

  • 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)}
    cross(u, v) = {sum(i=1, #u, sum(j=1, #v, gcd(u[i], v[j])))}
    S(n, r)={my(t=#r+1); vector(n+1, n, if(nAndrew Howroyd, Sep 07 2019

Formula

a(n) + A304072(n) = A304074(n).
G.f.: B(x)/G(x) - (x*C(x)/G(x))^2, where B(x) is the g.f. of A304069, C(x) is the g.f. of A000666 and G(x) is the g.f. of A000088. - Andrew Howroyd, Sep 07 2019

Extensions

Terms a(13) and beyond from Andrew Howroyd, Sep 07 2019
Showing 1-4 of 4 results.