There are two kinds of formulas commonly used to describe sequences.

Recursive

Refers to the previous terms to define the next term. The starting term(s) must be defined.

Example

Find the recursive sequence formula for

In programming, we can implement a recursive sequence using recursion.

Code

The Fibonacci Sequence is defined as where and . In Java, this implementation would look like:

public static int fibonacci(int n) {
	if (n == 0)
		return 0;
	else if (n == 1)
		return 1;
	return fibonacci(n - 1) + fibonacci(n - 2);
}

Explicit

Describes a term using only its position number. This allows us to know exactly what value any particular term has.

Example

Find the explicit sequence formula for