A recursive function is a function that defines each term of a sequence using the previous term i.e., The next term is dependent on one or more known previous terms. Recursive function h(x) is written as,
h(x) = a0h(0) + a1h(1) + a2h(2) + ... + ax - 1h(x - 1)
where,
- ai ≥ 0
- i = 0, 1, 2, 3, ... ,(x - 1)
The recursion formulas are the formulas that are used to write the recursive functions or recursive series.
Recursive Formula is a formula that defines each term of sequence using the previous/preceding terms. It defines the following parameters
- First Term of Sequence
- Pattern rule to get any term from its previous terms
Recursive Formulas For Various Sequences
Recursive Sequences are the sequences in which the next term of the sequence is dependent on the previous term. One of the most important recursive sequence is the Fibonacci Sequence:
The recursive formulas or the recursion formulas for different kinds of the sequences are,
Sequence Type | Recursive Formula | Description |
---|
Arithmetic Sequence | an = a(n-1) + d for n ≥ 2 | Each term is obtained by adding a constant d to the previous term. |
Geometric Sequence | an = an-1 ·r for n ≥ 2 | Each term is obtained by multiplying the previous term by a constant ratio r. |
Fibonacci Sequence | Fn = Fn−1 + Fn−2 for n ≥ 2 | Each term is the sum of the two preceding terms, starting with F0 = 0 and F1 = 1. |
Triangular Numbers | Tn = Tn−1 + n | The nth triangular number is the sum of the first n natural numbers. |
Factorial | n! = n⋅(n−1)! | The factorial of n is the product of all positive integers up to n, with 0! = 1. |
Read More,
Example 1: Given a series of numbers with a missing number in middle 1, 11, 21, ?, 41. Using recursive formula find the missing term.
Solution:
Given: 1, 11, 21, ..., 41
First term (a) = 1
d = T2 - T1 = T3 - T2
⇒ d = 11 - 1 = 21 - 11 = 10
Recursive Function in AP an = an-1 + d
a4 = a4-1 + d
⇒ a4 = a3 + d
⇒ a4 = 21 + 10
⇒ a4 = 31
Example 2: Given series of numbers 5, 9, 13, 17, 21,... From the given series find the recursive formula
Solution:
Given number series: 5, 9, 13, 17, 21,...
First Term (a) = 5
d = T2 - T1 = T3 - T2
⇒ d = 9 - 5 = 13 - 9 = 4
Recursive Formula for AP an = an-1 + d
an = an-1 + 4
Example 3: Given a series of numbers with a missing number in middle 1, 3, 9,...,81, 243. Using recursive formula find the missing term.
Solution:
Given: 1, 3, 9,..., 81, 243
First Term (a) = 1
- a2/a1 = 3/1 = 3
- a3/a2 = 9/3 = 3
- a5/a4 = 243/81 = 3
Common Ratio (r) = 3
Recursive Function to find nth term in GP an = an-1 × r
a4 = a4-1 × r
⇒ a4 = a3 × r
⇒ a4 = 9 × 3
⇒ a4 = 27
Example 4: Given series of numbers 2, 4, 8, 16, 32, ... From the given series find the recursive formula.
Solution:
Given number series,
2, 4, 8, 16, 32, ...
First term (a) = 2
- a2/a1 = 4/2 = 2
- a3/a2 = 8/4 = 2
- a4/a3 = 16/8 = 2
Common Ratio (r) = 2
Recursive Formula an = an-1 × r
an = an-1 × 2
Example 5: Find the 5th term in a Fibonacci series if the 3rd and 4th terms are 2,3 respectively.
Solution:
Given,
Then in Fibonacci Sequence, a5 = a3 + a4
a5 = 2 + 3
⇒ a5 = 5