cp's OEIS Frontend

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.

A317908 Number of decimal places to which the n-th convergent of the continued fraction expansion of Khintchine's constant matches the correct value.

This page as a plain text file.
%I A317908 #20 May 22 2025 10:21:48
%S A317908 0,-1,1,2,2,3,3,4,4,6,5,8,8,9,11,13,12,14,15,16,16,16,18,21,21,23,24,
%T A317908 24,25,25,26,27,28,29,30,30,32,32,33,33,36,35,36,37,37,38,39,39,40,41,
%U A317908 42,42,43,44,45,44,46,47,48,48,49,50,51,54,55,56,56,58,58,60
%N A317908 Number of decimal places to which the n-th convergent of the continued fraction expansion of Khintchine's constant matches the correct value.
%C A317908 Decimal expansion of Khintchine's constant in A002210.
%C A317908 For the similar case of the number of correct decimal digits of Pi see A084407.
%C A317908 For the similar case of the number of correct decimal digits of log(2) see A317558.
%C A317908 For the number of correct binary places see A317907.
%H A317908 A.H.M. Smeets, <a href="/A317908/b317908.txt">Table of n, a(n) for n = 1..20000</a>
%F A317908 Limit_{n -> oo} (a(n)/n) = 2*log(A086702)/log(10) = 2*A100199/log(10) = 2*A240995.
%e A317908    n   convergent     decimal expansion    a(n)
%e A317908   ==  =============  ====================  ====
%e A317908    1     2 / 1       2.0                     0
%e A317908    2     3 / 1       3.0                    -1
%e A317908    3     8 / 3       2.66...                 1
%e A317908    4    43 / 16      2.687...                2
%e A317908    5    51 / 19      2.684...                2
%e A317908    6    94 / 35      2.6857...               3
%e A317908    7   239 / 89      2.6853...               3
%e A317908    8   333 / 124     2.68548...              4
%e A317908    9   572 / 213     2.68544...              4
%e A317908   10  2049 / 763     2.6854521...            6
%e A317908   oo  lim = A002210  2.685452001065306...   --
%o A317908 (Python)
%o A317908 i,cf = 0,[]
%o A317908 while i <= 20100:
%o A317908     c = A002211(i)
%o A317908     cf,i = cf+[c],i+1
%o A317908 p0,p1,q0,q1,i,base = cf[0],1,1,0,1,10
%o A317908 while i <= 20100:
%o A317908     p0,p1,q0,q1,i = cf[i]*p0+p1,p0,cf[i]*q0+q1,q0,i+1
%o A317908 a0 = p0//q0
%o A317908 p0 = p0-a0*q0
%o A317908 i,p0,dd = 0,p0*base,[a0]
%o A317908 while i < 21000:
%o A317908     d,p0,i = p0//q0,(p0%q0)*base,i+1
%o A317908     dd = dd+[d]
%o A317908 n,pn0,pn1,qn0,qn1 = 1,a0,1,1,0
%o A317908 while n <= 20000:
%o A317908     p,q = pn0,qn0
%o A317908     if p//q != a0:
%o A317908         print(n,"- manual!")
%o A317908     else:
%o A317908         i,p,di = 0,(p%q)*base,a0
%o A317908         while di == dd[i]:
%o A317908             i,di,p = i+1,p//q,(p%q)*base
%o A317908         print(n,i-1)
%o A317908     n,pn0,pn1,qn0,qn1 = n+1,cf[n]*pn0+pn1,pn0,cf[n]*qn0+qn1,qn0
%Y A317908 Cf. A002210, A002211, A086702, A100199, A240995, A317907.
%K A317908 sign,base
%O A317908 1,4
%A A317908 _A.H.M. Smeets_, Aug 10 2018