My colleagues at Uppsala University regularly give some puzzles to everyone. We got the following one for this week. I like it because it sort of shows how computer can help with this type of problems.
NoneThe problem¶
Let $a_n = 1+\sqrt{2+\sqrt{3+\dots+\sqrt{n+\sqrt{n+1}}}}$. Show that $a_n$ is bounded
The experimental solution¶
Let's try some numeric experiment first.
def a(n, prec=53, numeric=False):
n0 = n
value = n+1
while n0 >0:
value = (n0+sqrt(value))
if numeric:
value = value.n(prec=prec)
n0 -= 1
return value
The sequence
[a(n) for n in range(1,6)]
The numeric value
[a(n, numeric=True) for n in range(1,10)]
This does look convergent. What is the limit?
a(100000, numeric=True, prec=100)
If you check this number on WolframAlpha, you will see that it's the square of the nest-radical-constant, which is defined by the limit of $$ b_n = \sqrt{1+\sqrt{2+\dots \sqrt{n}}} $$ And you will find this OEIS page for it. This page tells you that, $$ \sqrt{c_1+\sqrt{c_2+\dots \sqrt{c_n}}} $$ converges if and only if $$ \limsup_{n \to \infty} \frac{\log(c_n)}{2^n} < \infty $$ In other words, we take $c_n = e^{2^n}$ and we will still get convergent. This gives us a lot of liberty to upper bound the original problem.
The easiest choice is actually just take $c_n = 2^{2^n} \ge n$. Let see what we get.
def a1(n, prec=53, numeric=False):
n0 = n
value = 2^(2^(n+1))
while n0 >0:
value = (2^(2^n0))+sqrt(value)
if numeric:
value = value.n(prec=prec)
n0 -= 1
return sqrt(value)
a1l=[a1(n) for n in range(1,6)]
a1l
So we just need to show this sequence converges
a1l = [1/2 * v for v in a1l]
a1l
And this is quite obvious if you look at this picture
var('x')
plot([sqrt(1+x),x], (x,1,2), legend_label=[r"$\sqrt{1+x}$",r"$x$"], aspect_ratio=1)
This means if we let $f(x)=\sqrt{1+x}$ and $f_n(x)$ be $f$ applied to $x$ for $n$ times, then $f_n(x)$ converges to the fixed point of $f(x)$, regardless of where you start. And this fixed point is
sol = solve(1+x==x^2,x)
show(sol[1])
This concludes the proof.