Hugo van der Sanden wrote in message <39FE2BA7.1371F868@crypt0.demon.co.uk>... >r3769 wrote: >> >> Given an initial value x with 0<x<1, define a random 1-expansion of >> x recursively as follows: >> >> Choose [the integer] a[i] (randomly) subject to floor(a[i]*x[i])=1, >> and then set x[i+1]=a[i]*x[i]-1. >> >> The length of a random 1-expansion of x is n where x[n]=0. >> >> What is the average length of all the random 1-expansions of 1/7? > >Let f(q) represent the expected length of the random 1-expansion of 1/7, >and let a thru f represent f(1/7) through f(6/7) respectively. > >Then we get a set of six simultaneous equations: >a = 1 + (0 + a + b + c + d + e + f)/7 >b = 1 + (a + c + e)/3 >c = 1 + (b + e)/2 >d = 1 + (a + e)/2 >e = 1 + c >f = 1 + e > >.. and solving gives a = 67, as required.