login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A308720 The maximum value in the continued fraction of sqrt(n), or 0 if there is no fractional part. 0

%I #18 Jun 29 2019 08:34:38

%S 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,

%T 10,10,10,10,10,0,12,12,12,12,12,12,12,12,12,12,12,12,0,14,14,14,14,

%U 14,14,14,14,14,14,14,14,14,14,0,16,16,16,16,16,16,16

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

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

%H Oskar Perron, <a href="https://archive.org/details/dielehrevondenk00perrgoog/page/n5">Die Lehre von den Kettenbrüchen</a>, B. G. Teubner (1913), section 24, p. 87.

%F a(k^2) = 0.

%F a(m) = floor(sqrt(m)) for nonsquare m.

%F a(n) = 2 * A320471(n) for n > 0.

%t {0} ~Join~ Table[2 Mod[Floor@ Sqrt@ n, Ceiling@ Sqrt@ n], {n, 100}] (* _Giovanni Resta_, Jun 29 2019 *)

%Y Cf. A000196, A003285, A096494.

%K nonn,easy

%O 0,3

%A _Karl Fischer_, Jun 19 2019

%E More terms from _Giovanni Resta_, Jun 29 2019

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 18:04 EDT 2024. Contains 371254 sequences. (Running on oeis4.)