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:2:52

Worked example: using recursive formula for arithmetic sequence

Video transcript

we are told B of 1 is equal to negative 7 and B of n is equal to B of n minus 1 plus 12 and they're asking us to find the fourth term in the sequence so what we have up here which you could use a function definition it's really defining the terms of a sequence so especially if you were to input whole numbers in here that's the index on your sequence so what we really want to do is we want to figure out what is B of 4 going to be equal to well if we just blindly apply this we would say all right B of 4 so be event is equal to B of n minus 1 plus 12 so it's going to be B of 4 minus 1 plus 12 well 4 minus 1 is just 3 so it's going to be equal to B of 3 plus 12 all I did is said okay well we're not trying to figure out or we're not immediately trying to figure out what B of 1 is we're trying to figure out what B of 4 is so n is equal to 4 so ba4 is going to be equal to B of 4 minus 1 or B of 3 plus 12 well to evaluate this we have to figure out what B of 3 is so let's write that down that's what's fun about a recursive definition you have to keep recursing backwards so B of 3 well if n is 3 that's going to be equal to B of now n minus 1 is 2 B of 2 plus 12 well we don't know what B of 2 is let's keep going so need to figure out B of 2 if we use the same definition B of 2 is going to be equal to B of 2 minus 1 plus 12 so B if 2 minus 1 that's B of 1 plus 12 but we don't know what B of 1 is so let's figure that out B of 1 is equal to well here we can finally use this top Clause so B of 1 is equal to negative 7 so now we can go and fill everything back in if B of 1 is equal to negative 7 that we know that this right over here is negative 7 and now we can figure out that B of two is equal to negative 7 plus 12 which is equal to 5 well if B of 2 is equal to 5 well then this is equal to 5 right over here and then now we know that B of 3 is equal to 5 plus 12 which is equal to 17 well if we know that B of 3 is equal to 17 then we're ready to calculate with B of 4 is going to be B of 4 is now it's B of 3 which we figured out with 17 plus 12 which is equal to 29 and we are done