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.

A058304 Continued fraction for Liouville's number (A012245).

This page as a plain text file.
%I A058304 #51 Feb 16 2025 08:32:43
%S A058304 0,9,11,99,1,10,9,999999999999,1,8,10,1,99,11,9,
%T A058304 999999999999999999999999999999999999999999999999999999999999999999999999,
%U A058304 1,8,11,99,1,10,8,1,999999999999,9,10,1,99,11,9
%N A058304 Continued fraction for Liouville's number (A012245).
%C A058304 From _A.H.M. Smeets_, Jun 06 2018: (Start)
%C A058304 Except for the first term, the only values that occur in this sequence are 1,8,9,10,11,and values 10^((m-1)*m!)-1 for m > 1. The probability of occurrence P(a(n) = k) are given by:
%C A058304 P(a(n) = 1) = 1/4,
%C A058304 P(a(n) = 8) = 1/8,
%C A058304 P(a(n) = 9) = 1/8,
%C A058304 P(a(n) = 10) = 1/8,
%C A058304 P(a(n) = 11) = 1/8 and
%C A058304 P(a(n) = 10^((m-1)*m!)-1) = 2^-(m+1) for m > 1. (End)
%D A058304 Harold M. Stark, "An Introduction to Number Theory," The MIT Press, Cambridge, MA and London, England, Eighth Printing, 1994, pages 172 - 177.
%H A058304 Muniru A Asiru, <a href="/A058304/b058304.txt">Table of n, a(n) for n = 0..62</a>
%H A058304 J. O. Shallit, <a href="https://doi.org/10.1016/0022-314X(82)90047-6">Simple Continued Fractions for Some Irrational Numbers II</a>, J. Number Theory 14 (1982), 228-231.
%H A058304 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/LiouvillesConstant.html">Liouville's Constant</a>
%H A058304 G. Xiao, <a href="http://wims.unice.fr/~wims/en_tool~number~contfrac.en.html">Contfrac</a>
%H A058304 <a href="/index/Con#confC">Index entries for continued fractions for constants</a>
%F A058304 From _A.H.M. Smeets_, Jun 26 2018: (Start)
%F A058304 a(n) = 1 iff n in A317331,
%F A058304 a(n) = 8 iff n in A317332,
%F A058304 a(n) = 9 iff n in A317333,
%F A058304 a(n) = 10 iff n = 8*m - 6 + 3*(m mod 2) for m > 0,
%F A058304 a(n) = 11 iff n = 8*m - 3 - 3*(m mod 2) for m > 0,
%F A058304 a(n) = 10^((m-1)*m!)-1 iff n in {2^m*(1+k*4) - 1 | k >= 0} union {2^m*(3+k*4) | k >= 0} for m > 1. (End)
%e A058304 0.1100010000000000000000010... = 0 + 1/(9 + 1/(11 + 1/(99 + 1/(1 + ...)))). - _Harry J. Smith_, May 15 2009
%p A058304 with(numtheory): cfrac(add(1/10^factorial(n),n=1..7),62,'quotients'); # _Muniru A Asiru_, Aug 08 2018
%t A058304 ContinuedFraction[ Sum[ 1 /10^(n!), {n, 1, 7} ], 40 ]
%o A058304 (PARI) { allocatemem(932245000); default(realprecision, 200000); x=contfrac(suminf(n=1, 1.0/10^n!)); for (n=1, 255, write("b058304.txt", n, " ", x[n])); } \\ _Harry J. Smith_, May 15 2009
%o A058304 (Python)
%o A058304 n,f,i,p,q,base = 1,1,0,0,1,10
%o A058304 while i < 1000:
%o A058304     i,p,q = i+1,p*base,q*base
%o A058304     if i == f:
%o A058304         p,n = p+1,n+1
%o A058304         f = f*n
%o A058304 n,a,j = 0,0,0
%o A058304 while p%q > 0:
%o A058304     a,f,p,q = a+1,p//q,q,p%q
%o A058304     print(a-1,f)
%o A058304 # _A.H.M. Smeets_, Aug 03 2018
%Y A058304 Cf. A012245.
%Y A058304 Cf. A317413 (in base 2), A317414 (in base 3) A317661 (in base 4 and general).
%K A058304 cofr,nonn
%O A058304 0,2
%A A058304 _Robert G. Wilson v_, Dec 08 2000
%E A058304 Offset changed to 0 on the advice of _A.H.M. Smeets_ by _Muniru A Asiru_, Aug 11 2018