A317414 Continued fraction for ternary expansion of Liouville's number interpreted in base 3 (A012245).
0, 2, 4, 8, 1, 3, 2, 531440, 1, 1, 3, 1, 8, 4, 2, 22528399544939174411840147874772640, 1, 1, 4, 8, 1, 3, 1, 1, 531440, 2, 3, 1, 8, 4, 2
Offset: 0
Links
- A.H.M. Smeets, Table of n, a(n) for n = 0..62
Crossrefs
Programs
-
Maple
with(numtheory): cfrac(add(1/3^factorial(n),n=1..7),30,'quotients'); # Muniru A Asiru, Aug 11 2018
-
Mathematica
ContinuedFraction[ FromDigits[ RealDigits[ Sum[1/10^n!, {n, 8}], 10, 10000], 3], 60] (* Robert G. Wilson v, Aug 09 2018 *)
-
Python
n,f,i,p,q,base = 1,1,0,0,1,3 while i < 100000: i,p,q = i+1,p*base,q*base if i == f: p,n = p+1,n+1 f = f*n n,a,j = 0,0,0 while p%q > 0: a,f,p,q = a+1,p//q,q,p%q print(a-1,f)
Formula
a(n) = 1 if and only if n in {floor(8*n/3) + A317627(n) | n > 0}.
a(n) = 2 if and only if n in {8*n - 10 + 3*A089013(n-1) | n > 0}.
a(n) = 3 if and only if n in {16*n - 11 | n > 0} union {16*n - 6 | n > 0}.
a(n) = 4 if and only if n in {16*n - 14 | n > 0} union {16*n - 3 | n > 0}.
a(n) = 3^((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.
Comments