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.

Main content

# Converting recursive & explicit forms of geometric sequences

CCSS.Math:

## Video transcript

so I have the function G of X is equal to 9 times 8 to the X minus 1 power and it's defined for X for X being a positive or if X is a positive integer if X is a positive positive integer so we could say the domain of this function or all of the valid inputs here are positive integer so 1 2 3 4 5 on and on and on so this is an explicitly defined function what I now want to do is to write a recursive definition of this exact same function that give it an X it will give the exact same outputs so let's first just try to understand the inputs and outputs here so let's make a little table let's make a table here and let's think about what what happens when we put in various X's into this function definition so the domain is positive integer so let's try a couple of them 1 2 3 4 and then see what the corresponding G of X is G of X so when X is equal to 1 G of X is 9 times 8 to the 1 minus 1 power 9 times 8 to the 0 power or 9 times 1 so G of X is going to be just 9 when X is 2 when X is 2 what's going to happen will be 9 times 8 to the 2 minus 1 so that's the same thing as 9 times 8 to the first power and that's just going to be 9 times 8 so that is 72 actually let me just write it that way let me write it as just 9 times 8 9 times 8 then when X is equal to 3 what's going on here well this is going to be 3 minus 1 is 2 so it's going to be 8 squared so it's going to be 9 times 8 squared so we could write that as 9 times 8 times 8 I think you see a little bit of a pattern forming when X is 4 this is going to be 8 to the 4 minus 1 power 8 to the third power so that's 9 times 8 times 8 times 8 so this gives us a good clue about how we would define this recursively notice if our first term when x equals 1 is 9 every term after that is 8 x is 8 times the preceding term is 8 times the preceding term 8 times the preceding term 8 times the preceding term so let's define that as a recursive function so first we'll define our base case so we could say G of X G and I'll do this in a new color because I mean over using the red I like the blue G of X well we can define our base case it's going to be equal to 9 if X is equal to 1 G of x equals 9 if x equals 1 so that took care of that right over there and then if it equals anything else if it equals anything else it equals the previous G of X so if we're looking at if we're looking at let's go all the way down to X minus 1 and then an X so if this if this entry right over here if this entry right over here is G of X minus 1 G of X minus 1 however many times we multiply the eight and we have a 9 in front so this is G of X minus 1 we know that G of X we know that this one right over here is going to be the previous entry G of X minus 1 the previous entry that's the previous entry times 8 times 8 times 8 so we could write that right here so times 8 so for any other X other than 1 G of X is equal to the previous entry so it's G of I'll do that in that blue color G of X minus 1 G of X minus 1 times 8 if X is greater than 1 or X is X is integer integer greater greater than one now let's verify that this actually works so let's draw another table here let's draw another table here so once again we're going to have X and we're going to have G of X but this time we're going to use this recursive definition for G of X and the reason why it's recursive is it's referring to itself its own definition it's saying hey G of X well if X doesn't equal one it's going to be G of X minus one it's using the function itself but we'll see that it actually does work out so let's see when X is equal to one x equals one so G of one well if x equals one its equal to 9/2 equal to nine so that was pretty straightforward what happens when x equals two well when x equals two this case doesn't apply anymore we go down to this case so it's going to be when X is equal to two it's going to be equivalent to G of 2 minus 1 let me write this down it's going to be equivalent to G of 2 minus 1 times 8 which is the same thing as G of 1 times 8 and what's G of 1 well G of 1 is right over here G of 1 is 9 so this is going to be equal to 9 times 8 exactly what we got over here and of course this was equivalent to G of 2 so let me write this this is G of G of 2 let me scroll over a little bit so I don't get all squinched up so now let's go to 3 let's go to 3 and right now write G of 3 first so G of 3 G of 3 is equal to we're going to this case it's equal to G of 3 minus 1 3 minus 1 times 8 so that's equal to G of 2 times 8 well what's G of 2 well G of 2 we already figured out is 9 times 8 so it's equal to 9 times 8 that's G of 2 times 8 again and so you see we get the exact same results so this is the recursive definition of this function