An arithmetic sequence or arithmetic progression is a list of numbers (terms), separated by commas, in which consecutive terms differ by a common amount.
The first term is denoted `a_{1}`. The `n`th term, denoted `a_{n}`, is defined as `a_n=a_1+(n-1)d`, where `d` is the common difference and `n>=1`.
Example. The finite sequence of natural numbers, `1, 2, 3, ..., 7` defines an arithmetic sequence in which `a=1, d=1, n=7`.
Console