Alternative unconditional form of $\sqrt{n -\sqrt{n -\sqrt{n -\cdots}}}$?

117 Views Asked by At

Consider $a_n$, where

$$\begin{align} a_n &=\small{\sqrt{n -\!\!\!\sqrt{n -\!\!\!\sqrt{n -\!\!\sqrt{n -\!\!\sqrt{n -\!\!\sqrt{n -\!\sqrt{n - \cdots}}}}}}}}\end{align}$$

Using a recursive solution, such that:

$$a_n = f(n) = \sqrt{n - f(n)}$$

is too slow, while an iterated form don't fit my usage.

Is there a unconditional form of $a_n$ which don't rely as heavily on self-reference or recursion? Maybe an approximation?

2

There are 2 best solutions below

0
On BEST ANSWER

$a_n =\small{\sqrt{n -\!\!\!\sqrt{n -\!\!\!\sqrt{n -\!\!\sqrt{n -\!\!\sqrt{n -\!\!\sqrt{n -\!\sqrt{n - \cdots}}}}}}}}$

$a_n^2 =\small{n -\!\!\!\sqrt{n -\!\!\!\sqrt{n -\!\!\sqrt{n -\!\!\sqrt{n -\!\!\sqrt{n -\!\sqrt{n - \cdots}}}}}}}$

$a_n^2 -n =\small{ -\!\!\!\sqrt{n -\!\!\!\sqrt{n -\!\!\sqrt{n -\!\!\sqrt{n -\!\!\sqrt{n -\!\sqrt{n - \cdots}}}}}}}$

$a_n^2 -n =-a_n$

$a_n^2+a_n -n =0$

Using quadratic formula for positive root.

$a_n=\dfrac{-1+\sqrt{1+4n}}{2}$

0
On

$$a_n=\sqrt{n-a_n}\implies a_n^2 = n-a_n \implies a_n^2+a_n-n = 0 \implies a_n\in\left\{\frac12\left(-1\pm\sqrt{1+4n}\right)\right\}$$ Since $a_n$ is positive, we therefore have $$a_n =\frac{\sqrt{4n+1}-1}{2}$$