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.

A005639 Number of self-converse oriented graphs with n nodes.

Original entry on oeis.org

1, 2, 5, 18, 102, 848, 12452, 265759, 10454008, 598047612, 63620448978, 9974635937844, 2905660724913768, 1268590412128132389, 1023130650177394611897, 1258149993547327488275562, 2834863110716120144290954314, 9900859865505110360978721901778
Offset: 1

Views

Author

Keywords

References

  • R. W. Robinson, Numerical implementation of graph counting algorithms, AGRC Grant, Math. Dept., Univ. Newcastle, Australia, 1976.
  • R. W. Robinson, Asymptotic number of self-converse oriented graphs, pp. 255-266 of Combinatorial Mathematics (Canberra, 1977), Lect. Notes Math. 686, 1978.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A002785.

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[Sum[If[Mod[v[[i]] v[[j]], 2] == 0, GCD[v[[i]], v[[j]]], 0], {j, 1, i - 1}], {i, 2, Length[v]}] + Sum[If[Mod[v[[i]], 2] == 0, 2 Quotient[v[[i]] - 2, 4] + 1, 0], {i, 1, Length[v]}];
    a[n_] := Module[{s = 0}, Do[s += permcount[p]*3^edges[p], {p, IntegerPartitions[n]}]; s/n!];
    Array[a, 18] (* Jean-François Alcover, Aug 17 2019, 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, if(v[i]*v[j]%2==0, gcd(v[i],v[j])))) + sum(i=1, #v, if(v[i]%2==0, (v[i]-2)\4*2+1))}
    a(n) = {my(s=0); forpart(p=n, s+=permcount(p)*3^edges(p)); s/n!} \\ Andrew Howroyd, Sep 16 2018