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.

A071647 a(n) is the maximum number of elements among the continued fractions for n/1, n/2, n/3, n/4, ..., n/n.

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Jun 22 2002

Keywords

Comments

a(n)/log(n) is bounded.
Apart from initial term, same as A034883. - Franklin T. Adams-Watters, Nov 14 2006

Examples

			Continued fractions for 5/1 = [5]; 5/2 = [2, 2]; 5/3 = [1, 1, 2]; 5/4 = [1, 4]; 5/5 = [1]. Hence a(5) = 3.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Max[Table[Length[ContinuedFraction[n/k]], {k, 1, n}]]; Array[a, 100] (* Amiram Eldar, Apr 19 2025 *)
  • PARI
    for(n=1,150,print1( vecmax(vector(n,i,length(contfrac(n/i)))),","))