OFFSET
1,1
COMMENTS
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..12
EXAMPLE
1 + 1/2 + ... + 1/12 < Pi < 1 + 1/2 + ... + 1/13, so a(1) = 13.
1 + 1/2 + ... + 1/13 - 1/25 < Pi, so a(2) = 25.
1 + 1/2 + ... + 1/13 - 1/25 + 1/685 > Pi, so a(3) = 685.
MATHEMATICA
$MaxExtraPrecision = Infinity;
nn = 10; f[n_] := 1/n; r = Pi; s = 0; b[1] = NestWhile[# + 1 &, 1, ! (s += f[#]) > r &]; u[1] = Sum[f[n], {n, 1, b[1]}]; c[1] = Floor[1/(u[1] - r)]; v[1] = u[1] - 1/c[1]; n = 1; While[n < nn/2, n++; b[n] = Floor[1/(r - v[n - 1])]; u[n] = v[n - 1] + 1/b[n]; c[n] = Floor[1/(u[n] - r)]; v[n] = u[n] - 1/c[n]]; a = Riffle[Table[b[i], {i, 1, nn/2}], Table[c[i], {i, 1, nn/2}]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, May 24 2013
STATUS
approved