OFFSET
0,4
LINKS
John K. Sikora, Table of n, a(n) for n = 0..2061 (terms n = 0..1155 from Robert G. Wilson v)
J. K. Sikora, The first 2982556 terms of the CFE of the ternary Champernowne Constant (141 MB zipped)
Eric Weisstein's World of Mathematics, Ternary Champernowne Constant
MATHEMATICA
almostNatural[n_, b_] := Block[{m = 0, d = n, i = 1, l, p}, While[m <= d, l = m; m = (b - 1) i*b^(i - 1) + l; i++]; i--; p = Mod[d - l, i]; q = Floor[(d - l)/i] + b^(i - 1); If[p != 0, IntegerDigits[q, b][[p]], Mod[q - 1, b]]]; Take[ ContinuedFraction[ FromDigits[ {Array[almostNatural[#, 3] &, 20000], 0}, 3]], 100] (* Robert G. Wilson v, Jul 21 2014 *)
PROG
(PARI) \p 10000
t=0; r=0.; T=1; for(n=1, 1e6, d=#digits(n, 3); t+=d; T*=3^d; r+=n/T; if(t>20959, return)); v=contfrac(r); v[1..30] \\ Charles R Greathouse IV, Sep 23 2014
(PARI) A077772(b=3, t=1., s=b)={contfrac(sum(n=1, default(realprecision)*2.303/log(b)+1, n<s||s*=b; n*t/=s))} \\ First optional arg allows us to get the c.f. of C[b] for other bases. - M. F. Hasler, Oct 25 2019
CROSSREFS
KEYWORD
nonn,base,cofr
AUTHOR
Eric W. Weisstein, Nov 15 2002
STATUS
approved