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.

A051764 Number of torus knots with n crossings.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 1, 1, 1, 2, 2, 1, 0, 1, 2, 2, 1, 2, 1, 1, 1, 2, 1, 1, 0, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 3, 2, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 1, 1, 1, 2, 1, 2, 3, 1, 1, 2, 2, 2, 1, 2, 2, 1, 1, 3, 1, 1, 1, 1, 3, 3
Offset: 1

Views

Author

Keywords

Programs

  • Maple
    a:= n-> nops(select(k-> nAlois P. Heinz, Apr 25 2012
  • Mathematica
    a[n_] := (r = Reduce[Sqrt[n] < k <= n && GCD[k, 1 + n/k] == 1, k, Integers]; Which[r === False, 0, r[[0]] === Equal, 1, True, Length[r]]); Table[a[n], {n, 1, 105}] (* Jean-François Alcover, Jan 16 2013 *)
  • PARI
    a(n)=my(t=sqrtint(n));sumdiv(n,k,k>t && gcd(k,n/k+1)==1) \\ Charles R Greathouse IV, Apr 26 2012

Formula

a(n) = cardinality of the set {k| sqrt(n) < k <= n and gcd(k, 1+n/k) = 1}; see Murasugi article. - Hermann Gruber, Mar 05 2003