OFFSET
1,3
LINKS
Peter Luschny, Table of n, a(n) for n = 1..10000
FORMULA
a(n) < (1/2)*n^2. - Peter Luschny, Apr 12 2020
EXAMPLE
Illustrating the iterations:
n iter x 1/x x+1/x > n a(n)=iter
1 0 1.00 1.00 2.00 > 1 0
2 1 2.00 0.50 2.50 > 2 1
2 2.50 0.40 2.90 > 3
3 3 2.90 0.34 3.24 > 3 3
4 3.24 0.30 3.55 > 4
5 3.55 0.28 3.83 > 4
4 6 3.83 0.26 4.09 > 4 6
PROG
(Python)
from math import ceil
x = 1
l = []
for i in range(0, 2**11):
h = x
x += 1/x
if ceil(h) != ceil(x):
l.append(i)
print(l)
(PARI)
c=x=1; for(n=0, 1e4, h=x; o=c; c=ceil(x+=1./x); if(c>o, print1(n", ")))
\\ Charles R Greathouse IV, Apr 06 2020
(Julia)
using Nemo
function A333709List(bound, prec)
R = RealField(prec)
L = []
x = R(1)
z = ZZ(1)
for iter in 0:bound
x += 1/x
if z < x
push!(L, iter)
z += 1
end
end
return L
end
# Choose higher precision for larger bounds!
A333709List(2000, 64) |> println # Peter Luschny, Apr 11 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Sebastian F. Orellana, Apr 02 2020
STATUS
approved