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.

A013976 Number of tournaments on n nodes with a unique winner.

Original entry on oeis.org

1, 2, 6, 32, 600, 20544, 1218224, 160241152, 42129744768, 21293228876800, 22220602090444032, 45959959305969143808, 188702851949391611599872, 1566370829898884830446395392, 25801614282517307546368494213120, 851300764257208779000509484701188096
Offset: 1

Views

Author

Michael Stob (stob(AT)udu.calvin.edu)

Keywords

Crossrefs

Cf. A125031.

Programs

  • PARI
    Winners(n)={
      local(M=Map(Mat([x^0, 1])));
      my(acc(p, v)=my(z); mapput(M, p, if(mapisdefined(M, p, &z), z+v, v)));
      my(merge(r, p, v)=acc(p + sum(i=1, poldegree(p)-r-1, polcoef(p,i)*(1-x^i)), v));
      my(recurse(r, p, i, q, v, e)=if(i<0, merge(r, x^e+q, v), my(t=polcoef(p, i)); for(k=0, t, self()(r, p, i-1, (k+x*(t-k))*x^i+q, binomial(t, k)*v, e+k))));
      for(k=2, n, my(src=Mat(M)); M=Map(); for(i=1, matsize(src)[1], my(p=src[i, 1]); recurse(n-k, p, poldegree(p), 0, src[i, 2], 0)));
      Mat(M);
    }
    a(n)={my(M=Winners(n)); sum(i=1, matsize(M)[1], if(pollead(M[i,1])==1, M[i,2]))} \\ Andrew Howroyd, Feb 29 2020

Extensions

a(1)=1 inserted and a(12) and beyond from Andrew Howroyd, Feb 28 2020