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.

A053516 Number of directed 4-multigraphs with loops on n nodes.

Original entry on oeis.org

5, 325, 327125, 6360324375, 2483590604688125, 20211024423069510171875, 3524517841661451239027963515625, 13444967478414031326768049544880110156250, 1139744010069698074379093986222808985702884783203125
Offset: 1

Views

Author

Vladeta Jovovic, Jan 14 2000

Keywords

Crossrefs

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[2*GCD[v[[i]], v[[j]]], {i, 2, Length[v]}, {j, 1, i - 1}] + Total[v];
    a[n_] := (s=0; Do[s += permcount[p]*5^edges[p], {p, IntegerPartitions[n]}]; s/n!);
    Array[a, 15] (* Jean-François Alcover, Jul 08 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, 2*gcd(v[i],v[j]))) + sum(i=1, #v, v[i])}
    a(n) = {my(s=0); forpart(p=n, s+=permcount(p)*5^edges(p)); s/n!} \\ Andrew Howroyd, Oct 22 2017

Extensions

a(9) from Andrew Howroyd, Oct 22 2017