# Recursive equation to write a sequence

Try to figure it out on your own, then come back with the code if you can't do it. Introduction to geometric sequences Video transcript - [Voiceover] g is a function that describes an arithmetic sequence.

Here are the first few terms of the sequence. Find the values of the missing parameters A and B in the following recursive definition of the sequence. So they say the nth term is going to be equal to A if n is equal to one and it's going to be equal to g of n minus one plus B if n is greater than one.

And so I encourage you to pause this video and see if you could figure out what A and B are going to be. Well, the first one to figure out, A is actually pretty straightforward. If n is equal to one, if n is equal to one, the first term when n equals one is four.

So A is equal to four. So we could write this as g of n is equal to four if n is equal to one. And now let's think about the second line. The second line is interesting. It's saying it's going to be equal to the previous term, g of n minus one.

This means the n minus oneth term, plus B, will give you the nth term. Let's just think about what's happening with this arithmetic sequence. When I go from the first term to the second term, what have I done?

## What I Wish I Knew When Learning Haskell ( Stephen Diehl )

You see that right over here.Sep 07,  · How to Solve Recurrence Relations. In trying to find a formula for some mathematical sequence, a common intermediate step is to find the nth term, not as a function of n, but in terms of earlier terms of the sequence.

Write the generating function of the sequence. The objective in this step is to find an equation that will allow us to 66%(54). So once you know the common difference in an arithmetic sequence you can write the recursive form for that sequence. However, the recursive formula can become difficult to work with if we want to find the 50 th term.

Using the recursive formula, we would have to know the first 49 terms in order to find the 50 feelthefish.com sounds like a lot of work.

## Recursive formulas for arithmetic sequences | Algebra (video) | Khan Academy

To write the explicit or closed form of a geometric sequence, we use a n is the nth term of the sequence. When writing the general expression for a geometric sequence, you will not actually find a value for this. Sep 05,  · How to write a recursive or explicit equation for a sequence of values.

Recursion in computer science is a method of solving a problem where the solution depends on solutions to smaller instances of the same problem (as opposed to iteration). The approach can be applied to many types of problems, and recursion is one of the central ideas of computer science.

"The power of recursion evidently lies in the possibility of defining an infinite set of objects by a. Infinite or Finite.

When the sequence goes on forever it is called an infinite sequence, otherwise it is a finite sequence.

Geometric Sequences