$Line = 0;

\(\(\*""This will generate (Subscript[ξ, n]), the nth image of the original root."";\)\)
XiCycle[x_] := (1/(x - Floor[x]))

"And this will solve for r.";
RSolveCycle[x_, y_] := (1/x) + Floor[y]

\(\(\*""And now we define (Subscript[R, n]) by properly imbedding the two functions."";\)\)

RLessOdd[x_, n_] := 
      Fold[RSolveCycle, Floor[Nest[XiCycle, x, n]] + 1, 
        Table[Nest[XiCycle, x, n - m], {m, 1, n}]]

RLessEven[x_, n_] := 
      Fold[RSolveCycle, Floor[Nest[XiCycle, x, n]], 
        Table[Nest[XiCycle, x, n - m], {m, 1, n}]]

RLess[x_, n_] := 
      If[Mod[n, 2] == 0, RLessEven[x, n], RLessOdd[x, n]]

RMore[x_, n_] := 
      If[Mod[n, 2] == 0, RLessOdd[x, n], RLessEven[x, n]]

NIntegrate[RLess[x, 2], {x, 0, 1}, MaxRecursion -> 50]

Out[11] - (2 - π^2/6)

Show[{Plot[{x, RLess[x, 1], RLess[x, 2], RLess[x, 3], RLess[x, 4], 
            RLess[x, 5]}, {x, 0.0001,  .9999}, PlotRange -> {0, 1}, 
          AxesLabel -> {ξ, r}, PlotPoints -> 500], 
        Plot[{x, RLess[x, 1], RLess[x, 2], RLess[x, 3], RLess[x, 4], 
            RLess[x, 5]}, {x, 0.49,  .7}, PlotRange -> { .49,  .7}, 
          AxesLabel -> {ξ, r}, PlotPoints -> 500]}]

p1 = 
        Plot[{x, RMore[x, 1], RMore[x, 2], RMore[x, 3], RMore[x, 4], 
            RMore[x, 5]}, {x, 0.0001,  .9999}, PlotRange -> {0, 1}, 
          AxesLabel -> {ξ, r}, 
          PlotPoints -> 500];
p2 = 
        Plot[{x, RMore[x, 1], RMore[x, 2], RMore[x, 3], RMore[x, 4], 
            RMore[x, 5], RLess[x, 1], RLess[x, 2], RLess[x, 3], RLess[x, 4], 
            RLess[x, 5]}, {x, 0.0001, 1.0001}, PlotRange -> {0, 1}, 
          AxesLabel -> {ξ, r}, 
          PlotPoints -> 500];

Show[GraphicsArray[{{p1}, {p2}}]]

"Some calculations for probability bounds:"

"Results for the n,m=0 to x"

25 0.10076184365909681`

50 0.11016867619958298`

100 0.11528070452337372`

200 0.11794812298932572`

"Getting the result for 500"
aa1 = 
      N[Sum[Sum[((-1 + m)/((((1 + m (-1 + n)))^2) n (m (-1 + n) + n))), {m, 201, 500}], {n, 2, 
            200}]]
aa2 = 
      N[Sum[Sum[((-1 + m)/((((1 + m (-1 + n)))^2) n (m (-1 + n) + n))), {m, 2, 200}], {n, 201, 
            500}]]
aa3 = 
      N[Sum[Sum[((-1 + m)/((((1 + m (-1 + n)))^2) n (m (-1 + n) + n))), {m, 201, 500}], {n, 201, 500}]]

"The last one took too long and was aborted; the following shows it \
has a minimal contribution"

aa3 = 
      N[Sum[Sum[((-1 + m)/((((1 + m (-1 + n)))^2) n (m (-1 + n) + n))), {m, 201, 500}], {n, 201, 225}]]

aa3*8

(aa1 + 0.11794812298932572)
2 (aa1 + 0.11794812298932572)
1 - 2 (aa1 + 0.11794812298932572)

"And here is the integral method."

Table[NIntegrate[RLess[x, q], {x, 0,  .49999}], {q, 1, 10}] + 
      Table[NIntegrate[RLess[x, q], {x,  .500001,  .62499}], {q, 1, 10}] + 
      Table[NIntegrate[RLess[x, q], {x,  .625001,  .74999}], {q, 1, 10}] + 
      Table[NIntegrate[RLess[x, q], {x,  .750001,  .79999}], {q, 1, 10}] + 
      Table[NIntegrate[RLess[x, q], {x,  .800001,  .99999}], {q, 1, 
          10}]

T1 = %;

b[1] = T1[[1]]; 
    Do[b[j] = T1[[j]] - T1[[j - 1]], {j, 2, 10}];

failure10 = 2 (b[1] + b[3] + b[5] + b[7] + b[9])

success10 = 2 (b[2] + b[4] + b[6] + b[8] + b[10])

failure10 + success10

1 - success10

1 - failure10