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!)
A059855 Period of continued fraction for sqrt(n^2+4), n >= 1. 2

%I #14 May 01 2021 06:48:51

%S 1,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,

%T 5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,

%U 5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2,5,2

%N Period of continued fraction for sqrt(n^2+4), n >= 1.

%C From _Jianing Song_, May 01 2021: (Start)

%C The old name was "Quotient cycle length of sqrt(n^2+4)."

%C Essentially the same as A010695 and A021400. (End)

%F a(n) = 2 for even n, a(n) = 5 for odd n > 1.

%F a(n) = A003285(n^2+4). - _Jianing Song_, May 01 2021

%e For even n, sqrt(n^2+4) = [n; n/2, 2*n], hence a(n) = 2.

%e For odd n > 1, sqrt(n^2+4) = [n; (n-1)/2, 1, 1, (n-1)/2, 2*n], hence a(n) = 5.

%p with(numtheory): [seq(nops(cfrac(sqrt(k^2+4), 'periodic', 'quotients')[2]), k=1..100)];

%t a[n_] := Length @ ContinuedFraction[Sqrt[n^2 + 4]][[2]]; Array[a, 100] (* _Amiram Eldar_, May 13 2020 *)

%Y Cf. A003285, A010695, A021400.

%Y Period of continued fraction for sqrt(n^2+k): A059853 (k=3), this sequence (k=4), A059854 (k=5).

%K nonn,easy

%O 1,2

%A _Labos Elemer_, Feb 27 2001

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 April 25 11:06 EDT 2024. Contains 371967 sequences. (Running on oeis4.)