If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

### Unit 6: Lesson 5

General sequences

# Evaluating sequences in recursive form

Sal shows how to evaluate a sequence that is defined with a recursive formula. This definition gives the base case and then defines how to find the subsequent terms using the base case.

## Want to join the conversation?

• I am confused by the requirement that n must be a whole number. When he does the recursion and uses 7.2 as n (as in g(7.2)) - isn't that breaking the requirement? He is using a non-whole number as the value of n. Initially, n is indeed a whole number, but then when the recursion happens he now using a non-whole number for n which should invalidate the requirement. •  In this case, 7.2 isn't the value for n. The value for n here is 2, and 7.2 is the result. Note that it doesn't say g(7.2) anywhere, it's g(2)=7.2. We're looking for the 2nd element of the sequence g, which is 7.2. Hope that clears it up for you!
• This is reminding me of linear formulas...is there any relation? I know (at least in this video) that the base isn't n=0...but the n=1 seems to be similar to the "y intercept" and the formula is the slope. • Good observation!
If the difference between the consecutive terms is constant (like in the first example), then there is indeed a linear nature. We can see this, if we plot few points:
(1, 4), (2, 7.2), (3, 10.4), (4, 13.6) etc.
Note: We don't connect these points, because we are not trying to graph a line. We are trying to demonstrate a sequence.
• What is the explicit formula for that sequence (14,2,14,2)? • There is no explicit formula. If you recall from the first lesson of Geometric Sequences, (and if you haven't watched it, that's fine :D) the change between terms right next to each other (adjacent terms) have a common ratio. In this case, it doesn't.

Let me give you a demonstration: a(k) = {14, 2, 14, 2...}

2/14 = 0.14285...
14/2 = 7

What I've demonstrated to you, is that there is no common ratio. The ratios between the numbers are different.

For example, in this sequence: a(k) = {1, 3, 9, 27...}

3/1 = 3
9/3 = 3
27/9 = 3

There is a common ratio here. Any given "k" is the previous "k" times 3.

An essential part of explicit formulas is the common ratio! Since there is no common ratio in the first sequence, you can't represent it with an explicit formula. However, since there IS a common ratio in the second one, you CAN refer to it with an explicit formula: a(k) = 1(3)^k-1 => 3^k-1 (You don't need the one, but it always helps when you are confused about something, or something needs to be explained better)

The only reason that we can represent this with a recursive formula is because of the base cases, parameters that describe particular properties of a function.

This is an awesome question though! (And my apologies for being 2 years late)
• With regards to the last example, how would we write it in an explicit way? • i am lost- i keep wanting to input numbers into the function and work from there, but the lesson is more on how to generate terms with the formula ...like the last one with the -6 and -4, i am wanting to put in numbers in to the functions and work from their, but the method is to make up numbers related to the base cases,...its like for some reason reminding me of algebraic inverse rations where if a is inversely related proportinal to b, the a = 1/b and then you derive a formula....my statement now is reflective of how I am not getting this..i will. just gotta perservere any advice? • I think you may be confused with explicit functions in which you can just plug in any term you want, calculate, and you'll get the value of that term.

In this video Sal is working with recursive functions and you cannot just input any number into a recursive function and get a result. For a recursive function you have to work out the value of the term that came before which means you have to start from the very first term.

For example, @ :36 Sal is going through this process. He starts with g(1) and the definition of the function when n=1 is 4, therefore g(1)=4. When using a recursive function this is the starting point to work out the value of any term. If we want to work out the value of term 4 we have to work out g(2) and g(3) before we can work out g(4).

The example that you use in your comment is slightly different. In this example @ Sal shows we are given are 2 base cases. So if we want to work out the value of term 2, well we don't have to do anything because it's already been defined as -4, so g(2)=-4. But if we want to work out the value of term 3 that's when we have to do some work. So, g(3)=f(n-2)+f(n-1) which is saying adding the value of the last 2 terms to each other gives us the value of the 3rd term. The calculations are, where we are replacing n with 3 in formula, g(3)=f(3-2)+f(3-1) which gives us g(3)=-6+-4 which gives us g(3)=-10. Therefore, the value of the 3rd term is -10.

Does that make sense?
• What is the benefit of using a recursive formula over an explicit formula? Could you please give an example? For the first example in the video, it looks like a lot of work to have to work backwards once you start getting to higher function input numbers with a recursive formula. • • How would you solve:
f(1)=−3
f(n)=2⋅f(n−1)+1

f(2)=? • At . Should it not be 28/h(n-1). I dont undersand why sal says 28/h(1). Can someone answer please, Thank you. • Is the following recursive formula an arithmetic or a geometric sequence?

f(1)= -3
f(n)= 2 times f(n-1) +1

And how would you convert it to an explicit formula? 