A sequence is an ordered list of numbers. Each number in the sequence is called a term. You can write a sequence like .
For example, is a sequence of even numbers. The first term , the second term , and so on.
Sequences appear everywhere in programming: array indices, loop iterations, fibonacci numbers, powers of two. Recognizing the pattern lets you predict future terms or compute sums.