A308720 The maximum value in the continued fraction of sqrt(n), or 0 if there is no fractional part.
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
Links
- Oskar Perron, Die Lehre von den Kettenbrüchen, B. G. Teubner (1913), section 24, p. 87.
Programs
-
Mathematica
{0} ~Join~ Table[2 Mod[Floor@ Sqrt@ n, Ceiling@ Sqrt@ n], {n, 100}] (* Giovanni Resta, Jun 29 2019 *)
Formula
Extensions
More terms from Giovanni Resta, Jun 29 2019
Comments