Recursive Formula – Definition, Formula, and Examples

Learning about recursive formulas allows us to work with functions and sequences that are defined by observing the behavior between two succeeding terms. We can observe recursive formulas and recursion in our daily lives – this includes recording our savings and expenses, monitoring our progress in school, and even observing the number of sunflower petals! 

We define the recursive formula based on how the previous term affects the next term.

The recursive formula has a wide range of applications in statistics, biology, programming, finance, and more. This is also why knowing how to rewrite known sequences and functions as recursive formulas are important.

In our discussion, we will be showing how arithmetic, geometric, Fibonacci, and other sequences are modeled as recursive formulas. By the end of this article, we want you to feel confident when working on different problems involving recursive formulas!

What Is a Recursive Formula?

The recursive formula is defined by how the previous term, $a_{n-1}$, is defined by the next term, $a_n$. We use recursive formulas to establish patterns and rules that can be observed in a given sequence or series.

One way to understand the concept of recursive formulas is by thinking of a staircase, where each step represents the terms defined by a recursive formula.

illustrating recursive formulas

As with the steps of a staircase, we can understand how a recursive formula’s terms behave by looking moving from one step to the next. In recursive formulas, it is important that we know how we got from the previous term to the next. By observing this pattern, we’ll eventually learn how to define the sequence in terms of its $n$th terms with $a_{n-1}$ defining $a_n$’s expression.

\begin{aligned} a_1\overset{\mathbf{Step}}{\rightarrow} a_2\overset{\mathbf{Step}}{\rightarrow}a_3\overset{\mathbf{Step}}{\rightarrow}…a_{n-1} \overset{\mathbf{Step}}{\rightarrow}a_n\end{aligned}

This means that by observing the rule for each “step”, we’ll eventually learn how to define a given recursive formula and predict the value or behavior of the next term.

Recursive Formula Definition

We define recursive formulas based on two components:  1) the first term of the recursive sequence and 2) the pattern or rule defining the next term of the sequence.

Suppose that $f(n)$ represents the rule defining $a_n$ in terms of $a_{n -1}$ of a given sequence, we can represent its recursive formula as:

\begin{aligned}a_1 &= f_0 \,\, \text{Initial Value}\\a_n=f(a_{n-1})\end{aligned}

To help you understand how recursive formulas work, here are some recursive formulas of the arithmetic and geometric sequences:

SequenceRecursive Formula
Arithmetic Sequence

\begin{aligned}a_1\\a_n&= a_{n – 1} + d\end{aligned}

Where $d$ represents the common difference shared between two succeeding terms.

Geometric Sequence

\begin{aligned}a_1\\a_n&= r \cdot a_{n – 1} \end{aligned}

Where $r$ represents the common ratio shared between two succeeding terms.

Take a look at the arithmetic sequence, $1, 3, 5, 7, …$, for example. By inspecting the first few terms, we can see that the common difference shared by the two succeeding terms is $2$.

\begin{aligned}1\underbrace{,\,}_{+2} 3\underbrace{,\,}_{+2}5\underbrace{,\,}_{+2}7,…\end{aligned}

This means that the sequence will have a recursive formula of $\boldsymbol{a_n=a_{n -1} +2}$.

\begin{aligned}a_1 &=1\\a_n &=a_{n-1}+2\end{aligned}

By looking at the recursive formula, it will be easy to find the next terms of the series. When you’re given the value of $a_{n-1}$, you’ll also easily find the $a_n$ by evaluating the recursive formula.

Of course, there are instances when the sequence exhibits a more complex pattern. This is why knowing how to write recursive formulas and evaluating different recursive formulas is equally important.

How To Write a Recursive Formula?

We can write recursive formulas by taking note of the first term then observing any pattern shared between consecutive terms.

Here’s are some helpful pointers when writing recursive formulas:

  • Find the initial value or the first term, $a_1$.
  • Observe the first terms and see if you can find a pattern shared between succeeding terms.
  • Write your initial guess for the recursive formula in terms of $a_{n-1}$ and $a_n$ (there are instances when we might even need $a_{n -2}$!).
  • With your recursive formula, $a_n = f(a_{n-1})$, check if the rest of the terms follow the same rule.

Why don’t we work on the recursive formula of the sequence, $\{3,8,18,38, 98,….\}$? From inspecting the sequence, we have $a_1=3$. Now, look for possible rules or patterns that may apply to this sequence.

\begin{aligned}3 &\underbrace{\,\rightarrow \,}_{(3  {\color{orange}+ 1})\color{orange}\times 2}8\\8 &\underbrace{\,\rightarrow \,}_{(8  {\color{orange}+ 1})\color{orange}\times 2}18\\18 &\underbrace{\,\rightarrow \,}_{(18  {\color{orange}+ 1})\color{orange}\times 2}38\end{aligned}

This means that to find the next term, increase the previous term by $1$ then multiply the result by $2$. In algebraic expression, we can write this as $a_n = 2(a_{n -1} + 1)$. Now, to see if we already found the correct recursive formula, let’s confirm whether the consecutive terms, $38$ and $98$, satisfy the equation.

\begin{aligned}a_{n -1} &= 38\\a_n &= 98\\\\a_n&= 2(a_{n -1} + 1)\\98 &= 2(38 + 1)\\98&=98 \checkmark \end{aligned}

The recursive formula still applies for the last two terms that we have for the given sequence.

This confirms that the recursive formula for the sequence is:

\begin{aligned}a_1 &= 3\\a_{n -1} &= 2(a_{n -1} + 1) \end{aligned}

Use a similar process when finding recursive formulas of other sequences and series. Don’t worry, we’ve prepared other examples for you to work on as well! Review our discussion and when you’re ready, head over to the section below to work on more problems and to test your understanding of recursive formulas.

Example 1

An arithmetic sequence is defined by the recursive formula shown below.

\begin{aligned}a_1 &= 3\\a_n &= a_{n – 1} + 8\end{aligned}

What is the sixth term of the series?

Solution

We’re given the first term as well as the recursive formula of the arithmetic sequence. Evaluate $a_1 = 3$ to equation for $a_n$ to find the next term. This means that we need to add $8$ to the previous term to find the next term until we have the value of $a_6$.

\begin{aligned}a_1 &= 3 \\a_2 &= 3 \color{Teal}+ 8\\&= 11\\a_3 &= 11+ \color{Teal}8\\&= 19\\a_4 &= 19 + \color{Teal}8\\&=27\\ a_5&= 27+\color{Teal}8\\&=35\\a_6 &= 35 +\color{Teal}8\\&= 43 \end{aligned}

After adding $8$ to the previous term repeatedly, we’ve ended up with $a_6 = 43$. This example highlights how recursive formulas work – we need to rely on the previous term to get to the next.

Example 2

The recursive formula is defined as $f(n) = 6f(n– 4) + 1$, where $f(0) = -4$. What is the value of $f(12)$?

Solution

We can write recursive formulas as functions and this example clearly shows how. We’re given the initial value, $f(0) = -4$, and the rule, $f(n) = 6f(n – 4) + 1$. Keep in mind, however, that we’re still working with recursive formulas, so $n$ still represents the position of the term in the sequence. This means that we can use $f(0)$ to find the fourth term, $f(4)$.

\begin{aligned}f(0) &= -4\\f(4) &= 6f(4– 4) + 1\\&= 6f(0) + 1\\&=6(-4) + 1\\&= -23\end{aligned}

The next terms that will be easy to find are the eight and twelfth terms since we still need to work with $f(n – 4)$ each time. Luckily, we need $f(12)$, so use the same process to find $f(8)$ first then $f(12)$.

\begin{aligned}\boldsymbol{f(8)}\end{aligned}\begin{aligned}\boldsymbol{f(12)}\end{aligned}
\begin{aligned}f(4) &= -23\\f(8)&= 6f(8- 4) + 1\\&= 6f(4) + 1\\&= 6(-23) + 1\\&= -137\end{aligned}\begin{aligned}f(8) &= -137\\f(12)&= 6f(12- 4) + 1\\&= 6f(4) + 1\\&= 6(-137) + 1\\&= -821\end{aligned}

Hence, the twelfth term or $f(12)$ is equal to $-821$. This example shows that there are instances when we may not find all the terms from a recursive formula easily. However, we can still find key values using what is available.

Example 3

The Fibonacci sequence is one of the most known sequences that can be defined using a recursive formula. To find the next term of the Fibonacci sequence, simply add the last two terms.  The first two terms of a Fibonacci sequence are normally both equal to $1$. Mathematically, we can express that as

\begin{aligned}a_1 &= 1\\ a_2 &= 1\\a_n &= a_{n -2} + a_{n -1}\end{aligned}

Write down the first eight terms of the Fibonacci sequence.

Solution

As we have mentioned, the third term is equivalent to the sum of the first two terms.

\begin{aligned}a_3 &= a_1 + a_2\\&= 1 +1 \\&= 2\end{aligned}

Apply the same process to list down the first eight terms.

\begin{aligned}a_4 &= a_2 +a_3\\&= 1 + 2 \\&= 3\\\\a_5&= a_3 +a_4\\&= 3 + 2 \\&= 5\\\\a_6&= a_4 +a_5\\&=3 +5\\&=8\\\\a_7&= a_5 +a_6\\&=5 +8\\&=13\\\\a_8&= a_6 +a_7\\&=8 +13\\&=21\end{aligned}

This means that first eight terms of the Fibonacci sequence are: $\{1, 1, 2, 3, 5, 8, 13, 21\}$.

Example 4

Find a recursive formula that defines the sequence, $\{1, 3, 7, 15, 31, 63, 127,…\}$.

Solution

There are instances when a sequence can be defined by different recursive formulas. This problem is a good example and we’ll show you two recursive formulas that define the sequence, $\{1, 3, 7, 15, 31, 63, 127,…\}$.

Recursive Formula 1:

Since the terms are all odd, we can write each term as $(2k + 1)$, where $k$ is an integer.

\begin{aligned}1 &= 2(0) + 1\\3 &= 2(1) + 1\\7&= 2(3) + 1\\15&= 2(7) + 1\\31 &= 2(15) + 1\\63 &= 2(31) + 1\\127 &= 2(63) + 1\end{aligned}

By rewriting each term in this form, we can see that the next term is the result of doubling the previous term by $2$ then adding $1$ to the result.

\begin{aligned}a_1 &= 1\\a_2 &= 3\\&= 2(1) + 1\\a_3&=7\\&= 2(3) +1\\&\,\,\,\,.\\&\,\,\,\,.\\&\,\,\,\,.\\a_n &= 2a_{n – 1} + 1\end{aligned}

Double-check the validity of the recursive formula by checking if it still applies for the next few terms of the sequence.

\begin{aligned}63 &= 2(31) + 1\\127 &= 2(63) + 1\end{aligned}

Hence, the first possible recursive formula for the sequence is

\begin{aligned}a_1 &= 1\\a_n &= 2a_{n – 1} + 1\end{aligned}

Recursive Formula 2:

We can also observe the difference shared between two consecutive terms from the sequence, $\{1, 3, 7, 15, 31, 63, 127,…\}$.

\begin{aligned}1 \underbrace{,\,}_{+ 2} 3 \underbrace{,\,}_{+ 4}7\underbrace{,\,}_{+ 8} 15\underbrace{,\,}_{+ 16}31\underbrace{,\,}_{+ 32} 63 \underbrace{,\,}_{+ 64} 127,…\end{aligned}

As the sequence progresses, we can see that the difference between two consecutive terms doubles.

\begin{aligned}3 &= 1 + 2\\&=1 + 2^1\\7 &= 3 + 4\\&= 3 + 2^2\\15 &= 7 + 8\\&= 7 + 2^3\\31&= 15 + 16\\&= 15 + 2^4\\&\,\,\,\,.\\&\,\,\,\,.\\&\,\,\,\,\end{aligned}

From this observation, we can expect the sixth term to be equal to the sum of the fifth term, $a_5= 31$ plus $2^5$. Why don’t we confirm this and see if end up with $63$ as the sixth term?

\begin{aligned}a_6 &= a_5 + 2^5\\&=31  +32\\&= 63 \checkmark\end{aligned}

This means that given $a_{n – 1}$, $a_n$ is equal to $a_{n – 1} + 2^{n-1}$. Hence, another recurring formula that we have for this sequence is as shown below.

\begin{aligned}a_1 &= 1\\a_n &= a_{n -1} + 2^{n -1}\end{aligned}

From this problem, we have shown you that one sequence may be defined by two or even more recursive formulas.

Practice Questions

1. An arithmetic sequence is defined by the recursive formula shown below.
\begin{aligned}a_1 &= 2\\a_n &= a_{n – 1} + 4\end{aligned}
Which of the following shows the first four terms of the series?

a. $\{2, 4, 6, 8 \}$
b. $\{2, 6, 10, 14 \}$
c. $\{6, 10, 14, 18 \}$
d. $\{2, 6, 18, 54 \}$

2. A geometric sequence is defined by the recursive formula shown below.
\begin{aligned}a_1 &= 3\\a_n &= a_{n-1}\cdot 2^{n -1}\end{aligned}
Which of the following shows the fifth term of the sequence?

a. $24$
b. $48$
c. $64$
d. $96$

3. What is the next term of the Fibonacci sequence, $\{2,2, 4, 6, 10, …\}$?
a.$10$
b.$12$
c. $14$
d. $16$

4. Which of the following recursive formulas is equivalent to the sequence, $\{4, 9, 20, 42, 86, …\}$?

a. $\begin{aligned}a_1 &=4\\a_n &= 2(a_{n -1} – 1)\end{aligned}$
b. $\begin{aligned}a_1 &=4\\a_n &= 2a_{n-1}\end{aligned}$
c. $\begin{aligned}a_1 &=4\\a_n &= 2(a_{n -1} + 1)\end{aligned}$
d. $\begin{aligned}a_1 &=4\\a_n &= 2(a_n+ 1)\end{aligned}$

5. Which of the following recursive formulas is equivalent to the sequence, $\{1, 2, -2, 14, -50, 206,…\}$?

a. $\begin{aligned}a_1 &=1 \\a_n &= -4a_{n-1} + 6\end{aligned}$
b. $\begin{aligned}a_1 &=1 \\a_n &= -6a_{n-1} + 4\end{aligned}$
c. $\begin{aligned}a_1 &=1 \\a_n &= 4a_{n-1} + 6\end{aligned}$
d. $\begin{aligned}a_1 &=1 \\a_n &= 6a_{n-1} + 4\end{aligned}$

Answer Key

1. b
2. b
3. d
4. c
5. a