OFFSET
3,1
COMMENTS
The old name was "Quotient cycle length of sqrt(n^2+5) for n>=3." - Jianing Song, May 01 2021
LINKS
Amiram Eldar, Table of n, a(n) for n = 3..10000
FORMULA
If n is a multiple of 5 then a(n) = 2.
a(n) = A003285(n^2+5). - Jianing Song, May 01 2021
EXAMPLE
sqrt(13^2+5) = [13; 5, 4, 5, 26], so a(13) = 4.
sqrt(14^2+5) = [14; 5, 1, 1, 1, 2, 1, 8, 1, 2, 1, 1, 1, 5, 28], so a(14) = 14.
sqrt(15^2+5) = [15; 6, 30], so a(15) = 2.
sqrt(16^2+5) = [16; 6, 2, 3, 7, 1, 3, 1, 2, 1, 3, 1, 7, 3, 2, 6, 32], so a(16) = 16.
MAPLE
with(numtheory): [seq(nops(cfrac(sqrt(k^2+5), 'periodic', 'quotients')[2]), k=3..256)];
MATHEMATICA
a[n_] := Length[ContinuedFraction[Sqrt[n^2 + 5]][[2]]]; Array[a, 100, 3] (* Amiram Eldar, Jul 10 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Feb 27 2001
EXTENSIONS
New name by Jianing Song, May 01 2021
STATUS
approved