%I #20 Aug 16 2024 23:12:47
%S 4,2,6,4,2,6,10,2,12,16,2,16,20,2,10,10,2,12,10,2,28,10,2,26,16,2,18,
%T 48,2,34,12,2,26,32,2,32,32,2,20,70,2,56,34,2,24,22,2,54,52,2,70,16,2,
%U 18,38,2,16,36,2,12,72,2,114,30,2,64,32,2,52,54,2,22,92,2,154,88,2,56
%N Period of continued fraction for sqrt(n^2+3), n >= 2.
%C The old name was "Quotient cycle length of sqrt(n^2+3)." - _Jianing Song_, May 01 2021
%H Amiram Eldar, <a href="/A059853/b059853.txt">Table of n, a(n) for n = 2..10000</a>
%F If n is a multiple of 3 then a(n) = 2.
%F a(n) = A003285(n^2+3). - _Jianing Song_, May 01 2021
%e sqrt(35^2+3) = [35; 23, 2, 1, 7, 8, 1, 1, 1, 2, 2, 1, 1, 5, 3, 1, 16, 1, 3, 5, 1, 1, 2, 2, 1, 1, 1, 8, 7, 1, 2, 23, 70], so a(35) = 32.
%e sqrt(36^2+3) = [36; 24, 72], so a(36) = 2.
%e sqrt(37^2+3) = [37; 24, 1, 2, 7, 1, 8, 2, 1, 1, 1, 2, 2, 5, 1, 3, 18, 3, 1, 5, 2, 2, 1, 1, 1, 2, 8, 1, 7, 2, 1, 24, 74], so a(37) = 32.
%p with(numtheory): [seq(nops(cfrac(sqrt(k^2+3),'periodic','quotients')[2]),k=2..256)];
%t a[n_] := Length[ContinuedFraction[Sqrt[n^2 + 3]][[2]]]; Array[a, 100, 2] (* _Amiram Eldar_, Jul 10 2024 *)
%Y Cf. A003285.
%Y Period of continued fraction for sqrt(n^2+k): this sequence (k=3), A059855 (k=4), A059854 (k=5).
%K nonn
%O 2,1
%A _Labos Elemer_, Feb 27 2001
%E New name by _Jianing Song_, May 01 2021