Theory:

A sequence is a function defined on the set of natural numbers \(\mathbb{N}\). A sequence is a function of  form f:, where \(\mathbb{R}\) is the set of all real numbers.
If the sequence is of the form  \(a_1\), \(a_2\), \(a_3\), \(a_4\),.... then we can associate the function to the sequence \(a_1\), \(a_2\), \(a_3\), \(a_4\),.. by \(f (n) = a_n\), \(n = 1,2,3,\)…
 
2.svg
 
Let us solve a problem of sequence with a function to understand this concept.
Example:
The general term of a sequence is defined as f(n)=an=3n+5n+7. Find the first three terms \(a_1\), \(a_2\), a3.
 
Let us substitute the natural number \(n = 1, 2, 3, 4,..\) in the given equation.
 
The first three terms are:
 
f(n)=an=3n+5n+7, where \(n = 1, 2, 3, 4,..\).
 
a1=3(1)+51+7=3+58a1=88
 
a2=3(2)+52+7=6+59a2=119
 
a3=3(3)+53+7=9+510a3=1410
 
Therefore, the first three terms are:
  • \(a_ 1=\) 88,
  • \(a_ 2=\) 119,
  • a3 \(=\) 1410.