3
$\begingroup$

I would like to evaluate the limit: $$ \sqrt{1+\sqrt{2+\sqrt{3+\sqrt{4+\sqrt{5+\cdots}}}}} $$ Therefore, I write the following function of n:

g[p_, n_] := Sqrt[p] + n;
f[n_] := Sqrt[Fold[g, 0, Reverse@Range@n]],

and evaluate the limit:

Limit[f[n], n -> Infinity].

But Mathematica said:

Range::range: "Range specification in Range[n] does not have appropriate bounds."

Is there something wrong with my code? How can i make this work? Thanks in advance.

$\endgroup$
4
  • 1
    $\begingroup$ (1) Limit operates on continuous parameters only. It sometimes "works" for functions of a discrete parameter (sequences) but only if they accidently have definitions in terms of a continuous parameter that give the same limiting behavior. $\endgroup$ – Daniel Lichtblau Nov 27 '15 at 16:17
  • 1
    $\begingroup$ (2) Limit has absolutely no capability to handle what amounts to a program, e.g. f[n_]:=... where the ... part is computed by an iterative algorithm (e.g. using a function such as Fold or Nest). $\endgroup$ – Daniel Lichtblau Nov 27 '15 at 16:19
  • $\begingroup$ (3) I would surmise this is a difficult problem to do using Mathematica other than in an approximation approach. So it is an interesting question. $\endgroup$ – Daniel Lichtblau Nov 27 '15 at 16:28
  • $\begingroup$ @DanielLichtblau Thanks,I finally know why it is difficult to calculate this limit of the sequence in Mathematica. $\endgroup$ – robit Nov 29 '15 at 9:00
3
$\begingroup$

You can see that:

Fold[Sqrt[#1 + #2] &, 0, Reverse@Range[7]]

Mathematica graphics

is the Kasner number - - OEIS link with many references

DiscretePlot[Fold[Sqrt[#1 + #2] &, 0, Reverse@Range[i]], {i, 50}]

Mathematica graphics

$\endgroup$
4
  • $\begingroup$ I understand your idea is to calculation the function for large n instead of evaluate the limit itself. Does that mean there is no way to evaluate this limit directly in Mathematica? $\endgroup$ – robit Nov 27 '15 at 7:32
  • $\begingroup$ @robit Well, it's the Kasner number. See this. $\endgroup$ – Dr. belisarius Nov 27 '15 at 7:40
  • 1
    $\begingroup$ @robit You can find more info on the convergence of those series here ... those problems were Ramanujan's pets $\endgroup$ – Dr. belisarius Nov 27 '15 at 7:44
  • $\begingroup$ Thanks, I get it. These are very good references for sequences like this! $\endgroup$ – robit Nov 27 '15 at 8:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.