Let the function $A(n)$ be defined by: $$ A(n) = \sqrt{1+\sqrt{\dfrac{1}{2}+\sqrt{\dfrac{1}{3}+\cdots+\sqrt{\dfrac{1}{n}}}}} $$ Numerical computation of the sequence in, for example, Pascal is quite simple:
function A(N : integer) : double; var w : double; k : integer; begin w := 0; for k := N downto 1 do w := sqrt(1/k + w); A := w; end;But the strange thing about it is that it's sort of wrong headed iteration. Instead of going from $A_1$ to $A_n$ it goes from $A_{n+1}$ down to $A_1$: $$ A_{n+1} = 0 \quad ; \quad A_k = \sqrt{\frac{1}{k} + A_{k+1}} \quad ; \quad 1 \le k \le n $$ It's called Backward Recursion according to the internet (I've never seen it before). So the question is, remarkably, to find $A$ as: $$ A = \lim_{n\to \infty} A_1(n) \qquad \mbox{instead of} \qquad A = \lim_{n\to \infty} A_n $$ The numerical outcome is, of course, in agreement with Achille's, far less accurate though (what can be expected from double precision Pascal).