Math Fundamentals18 sections · 814 units
Open in Course

What is a Sequence?

Ordered lists of numbers

A sequence is an ordered list of numbers. Each number in the sequence is called a term. You can write a sequence like a1,a2,a3,...,ana_1, a_2, a_3, ..., a_n.

For example, 2,4,6,8,102, 4, 6, 8, 10 is a sequence of even numbers. The first term a1=2a_1 = 2, the second term a2=4a_2 = 4, 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.