OFFSET
1,2
COMMENTS
This constant x has the special property that the continued fraction expansion of 2*x results in the continued fraction expansion of x interleaved with 2's: contfrac(x) = [1;2,1,4,1,2,1,8,1,2,1,4,1,2,1,16,...A006519(n),... ] while contfrac(2*x) = [2;1, 2,2, 2,1, 2,4, 2,1, 2,2, 2,1, 2,8,... 2, A006519(n),...].
LINKS
Dzmitry Badziahin and Jeffrey Shallit, An Unusual Continued Fraction, arXiv:1505.00667 [math.NT], 2015.
Dzmitry Badziahin and Jeffrey Shallit, An unusual continued fraction, Proc. Amer. Math. Soc. 144 (2016), 1887-1896.
EXAMPLE
1.353871128429882374388894084016608124227333416812118556923672649787001842...
MATHEMATICA
cf = ContinuedFraction[ Table[ 2^IntegerExponent[n, 2], {n, 1, 200}]]; RealDigits[ FromContinuedFraction[cf // Flatten] , 10, 105] // First (* Jean-François Alcover, Feb 19 2013 *)
PROG
(PARI) /* This PARI code generates 1000 digits of x very quickly: */ {x=sqrt(2); y=x; L=2^10; for(i=1, 10, v=contfrac(x, 2*L); if(2*L>#v, v=concat(v, vector(2*L-#v+1, j, 1))); if(2*L>#w, w=concat(w, vector(2*L-#w+1, j, 1))); w=vector(2*L, n, if(n%2==1, 2, w[n]=v[n\2])); w[1]=floor(2*x); CFW=contfracpnqn(w); x=CFW[1, 1]/CFW[2, 1]*1.0/2; ); x}
(PARI) {CFM=contfracpnqn(vector(1500, n, 2^valuation(n, 2))); x=CFM[1, 1]/CFM[2, 1]*1.0}
CROSSREFS
KEYWORD
nonn,cons
AUTHOR
Paul D. Hanna, Nov 17 2004
STATUS
approved