OFFSET
0,2
LINKS
Harry J. Smith, Table of n, a(n) for n = 0..20000
Eric Weisstein's World of Mathematics, Prime Constant.
G. Xiao, Contfrac
EXAMPLE
0.414682509851111660248109622... = 0 + 1/(2 + 1/(2 + 1/(2 + 1/(3 + ...)))). - Harry J. Smith, Jun 15 2009
MATHEMATICA
ContinuedFraction[ FromDigits[{{Table[ If[ PrimeQ[n], 1, 0], {n, 370}]}, 0}, 2], 95] (* Robert G. Wilson v, Jan 15 2005 *)
PROG
(PARI) { default(realprecision, 20080); x=0; m=67000; for (n=1, m, if (isprime(n), a=1, a=0); x=2*x+a; ); x=contfrac(x/2^m); for (n=0, 20000, write("b051007.txt", n, " ", x[n+1])); } \\ Harry J. Smith, Jun 15 2009
CROSSREFS
KEYWORD
nonn,cofr
AUTHOR
STATUS
approved