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