# Writing Number Patterns in Function Notation

Given a number pattern, or a sequence of numbers we sometimes want to write the sequence in function notation, with the natural numbers are the domain of the function

One of the simplest kinds of number pattern is the arithmetic sequence , in which each term differs from the previous term by a constant amount.

An arithmetic sequence with the first term a1 and the common difference d can be written in function notation as

Example 1:

0, -7, -14, -21, -28, ...

This is an arithmetic sequence with the first term 0 and a common difference of -7.

You can check, for example, that the function gives the correct value for the fourth term:

Example 2:

4, 7, 10, 13, 16, 19, ...

This is an arithmetic sequence with the first term 4 and a common difference of 3.

Another kind of number pattern is a geometric sequence , where each term is found by multiplying the previous term by a constant r called the common ratio.

Example 3:

This is a geometric sequence with the first term and a common ratio of 3. It can be written in function notation as

Other more complicated sequences can also be written in function notation.