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
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
From Jianing Song, May 01 2021: (Start)
The old name was "Quotient cycle length of sqrt(n^2+4)."
Essentially the same as A010695 and A021400. (End)
LINKS
FORMULA
a(n) = 2 for even n, a(n) = 5 for odd n > 1.
a(n) = A003285(n^2+4). - Jianing Song, May 01 2021
EXAMPLE
For even n, sqrt(n^2+4) = [n; n/2, 2*n], hence a(n) = 2.
For odd n > 1, sqrt(n^2+4) = [n; (n-1)/2, 1, 1, (n-1)/2, 2*n], hence a(n) = 5.
MAPLE
with(numtheory): [seq(nops(cfrac(sqrt(k^2+4), 'periodic', 'quotients')[2]), k=1..100)];
MATHEMATICA
a[n_] := Length @ ContinuedFraction[Sqrt[n^2 + 4]][[2]]; Array[a, 100] (* Amiram Eldar, May 13 2020 *)
CROSSREFS
Period of continued fraction for sqrt(n^2+k): A059853 (k=3), this sequence (k=4), A059854 (k=5).
Sequence in context: A073054 A010695 A021400 * A082881 A104289 A309697
KEYWORD
nonn,easy
AUTHOR
Labos Elemer, Feb 27 2001
STATUS
approved

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 07:53 EDT 2024. Contains 371964 sequences. (Running on oeis4.)