This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A294226 #39 Jul 22 2025 17:12:33 %S A294226 2,2,2,2,2,4,4,8,8,12,16,32,36,60,72,128,136,244,292,508,576,972,1120, %T A294226 1992,2272,3948,4588,7924,9056,15764,18132,31832,36444,63216,72808, %U A294226 126456,145332,253112,290968,507096,581952,1012312,1163452,2026504,2327844,4051424,4656388 %N A294226 Length of period of continued fraction expansion of sqrt(3*2^n). %C A294226 Lim {n->inf} a(2n)/2^n = 0.555... %C A294226 Lim {n->inf} a(2n+1)/2^n = 0.966... %C A294226 It seems that Lim {n->inf} a(2n+1)/a(2n) = sqrt(3). %C A294226 It seems that Lim {n->inf} a(n)/2^n = (Lim {n -> inf} A064932(n)/3^n)/2. %H A294226 Chai Wah Wu, <a href="/A294226/b294226.txt">Table of n, a(n) for n = 0..80</a> (n = 0..46 from A.H.M. Smeets) %F A294226 a(n) = A003285(A007283(n)). - _Michel Marcus_, Oct 02 2019 %t A294226 Array[Length@ Last@ ContinuedFraction@ Sqrt[3*2^#] &, 47, 0] (* _Michael De Vlieger_, Oct 25 2017 *) %o A294226 (Python) %o A294226 # for odd n %o A294226 m, p, q = 0, 6, 2 %o A294226 tl, nl, tb, nb = 3, 1, 2, 1 %o A294226 while nl < 10**100000000: %o A294226 tl = tl * nb + tb * nl %o A294226 nl = 2 * nl * nb %o A294226 nb = tl %o A294226 tb = p * nl %o A294226 tl = tl *nb + tb * nl %o A294226 nl = 2 * nl * nb %o A294226 tel, noe = tl, nl %o A294226 while m >= 0: %o A294226 tl = tel*q**m %o A294226 nl = noe %o A294226 a0 = tl//nl %o A294226 t = 0 %o A294226 an = a0 %o A294226 while an != 2*a0: %o A294226 tl = tl - an*nl %o A294226 tl, nl = nl, tl %o A294226 an = tl//nl %o A294226 t = t + 1 %o A294226 print(2*m+1, t) %o A294226 m = m+1 %Y A294226 Cf. A003285, A007283, A059927, A064932, A293028. %K A294226 nonn %O A294226 0,1 %A A294226 _A.H.M. Smeets_, Oct 25 2017