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.

A089641 Number of k, 1<=k<=n, such that the number of elements in the continued fraction for n/k is maximum.

Original entry on oeis.org

1, 2, 1, 1, 1, 2, 2, 1, 2, 2, 2, 1, 1, 2, 1, 2, 4, 2, 2, 3, 1, 4, 2, 5, 3, 3, 2, 2, 2, 1, 2, 2, 4, 1, 2, 4, 2, 4, 1, 1, 4, 1, 2, 2, 3, 2, 2, 1, 2, 2, 4, 2, 4, 8, 1, 1, 5, 2, 4, 2, 8, 6, 5, 2, 1, 2, 2, 3, 2, 3, 4, 1, 3, 1, 2, 2, 7, 5, 2, 1, 2, 2, 2, 8, 2, 2, 4, 2, 1, 5, 2, 4, 4, 4, 2, 6, 2, 8, 2, 6, 6, 1, 2, 2, 2
Offset: 1

Views

Author

Benoit Cloitre, Jan 01 2004

Keywords

Crossrefs

Cf. A084242.

Programs

  • PARI
    a(n)=sum(s=1,n,if(length(contfrac(n/s))-vecmax(vector(n,i,length(contfrac(n/i)))),0,1))