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.

User: Karl Fischer

Karl Fischer's wiki page.

Karl Fischer has authored 1 sequences.

A308720 The maximum value in the continued fraction of sqrt(n), or 0 if there is no fractional part.

Original entry on oeis.org

0, 0, 2, 2, 0, 4, 4, 4, 4, 0, 6, 6, 6, 6, 6, 6, 0, 8, 8, 8, 8, 8, 8, 8, 8, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 0, 16, 16, 16, 16, 16, 16, 16
Offset: 0

Author

Karl Fischer, Jun 19 2019

Keywords

Comments

The continued fraction expansion of sqrt(n) is periodic, and the maximal element is the last element in the period, 2*floor(sqrt(n)).

Crossrefs

Programs

  • Mathematica
    {0} ~Join~ Table[2 Mod[Floor@ Sqrt@ n, Ceiling@ Sqrt@ n], {n, 100}] (* Giovanni Resta, Jun 29 2019 *)

Formula

a(k^2) = 0.
a(m) = 2 * floor(sqrt(m)) for nonsquare m.
a(n) = 2 * A320471(n) for n > 0.

Extensions

More terms from Giovanni Resta, Jun 29 2019