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
Current time:0:00Total duration:6:08

Converting recursive & explicit forms of arithmetic sequences

CCSS.Math:

Video transcript

so I have a function here H of n and let's say that it explicitly defines the terms of a sequence so let me make a little let me make a quick quick table here so we have N and then we have H of n when n is equal to 1 H of n is negative 31 minus 7 times 1 minus 1 which is going to be this is just going to be 0 so it's going to be negative 31 when n is equal to 2 it's going to be negative 31 minus 7 times 2 minus 1 so 2 minus 1 well this is just going to be 1 so it's negative 31 minus 7 which is equal to negative 38 when n is equal to 3 it's going to be negative 31 minus 7 times 3 minus 1 which is just 2 so we're going to subtract 7 twice so it's going to be negative 31 minus 14 which is equal to negative 45 so what do we see happening here well we're starting at negative 31 and then we keep subtracting we keep subtracting negative 7 we keep subtracting negative 7 from that in fact we subtract negative 7 1 less than the term we subtract negative 7 1 less times in the term we're dealing with if we're dealing with the third term we subtract negative 7 twice if we're dealing with the second term we subtract negative 7 watts so this is all nice but what I want you to do now is pause the video and see if you can define this exact same sequence so the sequence here is you start at negative 31 and you keep subtracting negative 7 so negative 38 negative 45 the next one is going to be negative 52 and you go on and on and on you keep subtracting negative 7 can we define this this sequence in terms of a recursive function so why don't you have a go at that alright let's try to define it in terms of a recursive function let's just call that G of n so G of n it's always a recursive function is easier because you could say okay look the first term when N is equal to 1 if n is equal to 1 let me just write it if n is equal to 1 if n is equal to one what's G of n going to be it's going to be negative 31 negative 31 and if n if n is greater than one and a whole number so this is going to be defined for all positive integers and whole and whole number well it's going to be it's just going to be the previous term so G of n minus one minus seven minus seven so we're saying if we get a if we if we if we're just picking an arbitrary term we just have to look at the previous term and then subtract and then subtract seven it all works out nice and nice and easy because you keep looking at previous previous previous terms all the way all the way until you get to the base case which is when n is equal to one and then you can build up back from that and you get this exact same sequence let's do another example but or let's go the other way around so here we have a we have a sequence defined recursively and I wanted to I want to create a function that defines the sequence explicitly so let's think about this so one way to think about it this sequence when n is equal to 1 it starts at nine point six and then every term is the previous term minus 0.1 so the second term is going to be the previous term minus 0.1 so it's going to be nine point five then going to go to nine point four then you're going to go to nine point three we could keep going on and on and on or if we want we can make a little table here and we could say this is n this is H of N and you see when n is equal to one H of n is nine point six when n is equal to two we're now in this case over here it's going to be H of two minus one so it's going to be H of one minus 0.1 well it's just going to be this minus 0.1 which is going to be nine point five when H is three it's going to be H of two H of two minus 0.1 minus 0.1 well H of two is right over here you subtract 1/10 you're going to get nine point four exactly what we saw over here so let's see if we can pause the video now and define this create a function that that constructs or defines this arithmetic sequence explicitly here it was recursively we wanted to find it explicitly all right so let's just call it I don't know let's just call it f of N and we could say look it's going to be nine point six but we're going to subtract we're going to subtract zero point one depending a certain number of times depending on what term we're talking about so we're going to subtract zero point one but how many times are we going to subtract it as a function of n well let's see if we're going about the first term we subtract zero times the second term we subtract one time the third term we subtract two times the fourth term we subtract three times so whatever term we're talking about we subtract that term minus one times so if we talk about the nth term we subtract n might we subtracted this value n minus one times and you can verify that this is going to work when n is equal to one this term here is going to be 0 so this whole thing's going to be zero you get nine point six when n is equal to two two minus one you subtract zero point one one time nine point six minus zero point one is nine point five and you could keep doing that you could draw a table and evaluate these if you want to but the key thing is you're starting at nine point six and you're subtracting zero point one one fewer times then the term you're looking at so if you're looking at the if n is equal to this is n is equal to four well you're going to subtract zero point one three times and you see that subtract zero point one once subtract zero point one twice subtract zero point one three times