I have defined a recursive sequence

a[0] := 1
a[n_] := Sqrt[3] + 1/2 a[n - 1]

because I want to calculate the Limit for this sequence when n tends towards infinity.

Unfortunately I get a recursion exceeded error when doing:

Limit[a[n], n -> Infinity]

How can I calculate the Limit for this sequence using Mathematica?


5 Answers 5


Alternatively, and perhaps more directly, use

RSolve[{a[n] == Sqrt[3] + 1/2 a[n - 1], a[0] == 1}, a[n], n]
(* {{a[n] -> 2^-n (1 - 2 Sqrt[3] + 2^(1 + n) Sqrt[3])}} *)
Limit[a[n] /. %[[1]], n -> Infinity]
(* 2 Sqrt[3] *)

[Possibly this is too cheap and should just be a comment, I'm not sure.]

One way to go about such problems is to realize that "in the limit", a[n]==a[n-1]. So just solve an algebraic equation. If there are multiple solutions then you need to figure out which is correct based on initial values and some other reasoning.

Solve[x == Sqrt[3] + x/2, x]

(* Out[130]= {{x -> 2 Sqrt[3]}} *)
  • 1
    $\begingroup$ Before setting up the algebraic equation $x=\sqrt{3}+\frac x 2$, we should show that the sequence $\{a_n\}$ is convergent. Namely, showing the monotonity and bounded property. $\endgroup$
    – xyz
    Jan 10, 2016 at 3:26
  • $\begingroup$ @ShutaoTang Correct. What I showed is on the quick-and-dirty side. For limiting behavior of Fibonacci sequences it does not work "out of the box", for example (you can get convergence by working with ratios of successive elements; again, showing that is a separate issue). $\endgroup$ Jan 10, 2016 at 16:23
  • 3
    $\begingroup$ @Daniel Lichtblau: there is even more behind the "quick and dirty" method in this case. We have a linear recursion. The solution must be a sum of a Special solution of the inhomogeneous equation and the General solution of the homogeneous equation. Now the first one can be found by letting a[n] = p which gives p = 2 Sqrt[3], the second one is A 2^-n which vanishes in the Limit so that we recover the known result. $\endgroup$ Jan 29, 2016 at 22:29

You can attempt to convert your sequence in terms of a function which is not recursive, then take the Limit of that function

a[0] = 1;
a[n_] := a[n] = Sqrt[3] + 1/2 a[n - 1]

seq30 = Table[a[ic], {ic, 0, 30}];
func = FindSequenceFunction[seq30, n]

Limit[func, n -> Infinity]
2^(1 - n) (1 - 2 Sqrt[3] + 2^n Sqrt[3])

2 Sqrt[3]

As of version 11.2, this can be dealt with by RSolveValue[]:

RSolveValue[{a[n] == Sqrt[3] + 1/2 a[n - 1], a[0] == 1}, a[∞], n]
   2 Sqrt[3]

Another possibility is to use SequenceLimit:

SequenceLimit[a /@ Range[10]]

2 Sqrt[3]


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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