Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
Welcome to Mathematica.SE! I hope you will become a regular contributor. To get started, 1) take the introductory tour now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign, and 4) give help too, by answering questions in your areas of expertise. – bbgodfrey Jan 9 at 3:13
up vote 8 down vote accepted

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] *)
share|improve this answer

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]
share|improve this answer

[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]}} *)
share|improve this answer
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. – Shutao Tang Jan 10 at 3:26
@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). – Daniel Lichtblau Jan 10 at 16:23
@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. – Dr. Wolfgang Hintze Jan 29 at 22:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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