OFFSET
1,1
COMMENTS
a(n+1) - a(n) is in {2,3} for n >= 1.
REFERENCES
Steven R. Finch, Mathematical Constants, Cambridge University Press, 2003, p. 14.
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..1000
EXAMPLE
Let w(n) = product{(n^2 + h)/(n^2 - h), h = 1..n} - e
Approximations are shown here:
n ... w(n) ........ 1/n
1 ... undefined .... 1
2 ... 2.28172 ..... 0.5
3 ... 1.21029 ...... 0.333333
4 ... 0.831169 ..... 0.25
5 ... 0.634485 ..... 0.2
6 ... 0.513554 ..... 0.166666
7 ... 0.431526 ..... 0.142857
a(2) = 7 because w(7) < 1/2 < w(6).
MATHEMATICA
z = 100; p[k_] := p[k] = Product[(k^2 + h)/(k^2 - h), {h, 1, k}] (* Finch p. 14 *)
N[Table[p[n] - E, {n, 2, z}]]
f[n_] := f[n] = Select[1 + Range[z], p[#] - E < 1/n &, 1];
u = Flatten[Table[f[n], {n, 1, z}]] ; (* A247985 *)
v = Differences[u];
Flatten[Position[v, 2]]; (* A247986 *)
Flatten[Position[v, 3]]; (* A247987 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Sep 29 2014
STATUS
approved