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 A317661 #27 Dec 19 2024 17:34:04 %S A317661 0,3,5,15,1,4,3,16777215,1,2,4,1,15,5,3, %T A317661 22300745198530623141535718272648361505980415,1,2,5,15,1,4,2,1, %U A317661 16777215,3,4,1,15,5,3 %N A317661 Continued fraction for quaternary expansion of Liouville's number interpreted in base 4 (A012245). %H A317661 A.H.M. Smeets, <a href="/A317661/b317661.txt">Table of n, a(n) for n = 0..62</a> %F A317661 In general for any Liouville's number base > 2: %F A317661 a(n) = 1 if (and only if, for base > 3) n in A317331, %F A317661 a(n) = base-2 if (and only if, for base > 3) n in A317332, %F A317661 a(n) = base-1 if and only if n in A317333, %F A317661 a(n) = base if and only if n in {8*m - 6 + 3*(m mod 2) | m > 0}, %F A317661 a(n) = base+1 if and only if n in {8*m - 3 - 3*(m mod 2) | m > 0}, %F A317661 a(n) = base^((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. %p A317661 with(numtheory): cfrac(add(1/4^factorial(n),n=1..7),30,'quotients'); # _Muniru A Asiru_, Aug 12 2018 %o A317661 (Python) %o A317661 n, f, i, p, q, base = 1, 1, 0, 0, 1, 4 %o A317661 while i < 100000: %o A317661 i, p, q = i+1, p*base, q*base %o A317661 if i == f: %o A317661 p, n = p+1, n+1 %o A317661 f = f*n %o A317661 n, a, j = 0, 0, 0 %o A317661 while p%q > 0: %o A317661 a, f, p, q = a+1, p//q, q, p%q %o A317661 print(a-1, f) %Y A317661 Cf. A012245, A317331, A317332, A317333. %Y A317661 Cf. A058304 (in base 10), A317413 (in base 2), A317414 (in base 3). %K A317661 nonn,base,cofr %O A317661 0,2 %A A317661 _A.H.M. Smeets_, Aug 03 2018