# Next terms of a sequence (next_terms)

The terms that follow a list, given only when a rule explains it and predicts two more.

## How to write it

### next_terms(terms)

The next five terms.

**terms**

The first terms, whole numbers or fractions, the first being a(1). Takes a list.

### next_terms(terms, count)

The next terms, as many as asked.

**terms**

The first terms, whole numbers or fractions, the first being a(1). Takes a list.

**count**

How many terms to give. Takes a whole number.

## Examples

- $\displaystyle 1, 4, 9, 16, 25, \ldots = \left[ 36, 49, 64, 81, 100 \right]$

  `next_terms([1, 4, 9, 16, 25])`

  In the solver, `next_terms([1, 4, 9, 16, 25])` gives `[36, 49, 64, 81, 100]`.

  [Open in the solver](https://hilberon.com/?q=next_terms%28%5B1%2C%204%2C%209%2C%2016%2C%2025%5D%29)
- $\displaystyle 1, 1, 2, 3, 5, 8, \ldots = \left[ 13, 21, 34, 55, 89 \right]$

  `next_terms([1, 1, 2, 3, 5, 8])`

  In the solver, `next_terms([1, 1, 2, 3, 5, 8])` gives `[13, 21, 34, 55, 89]`.

  [Open in the solver](https://hilberon.com/?q=next_terms%28%5B1%2C%201%2C%202%2C%203%2C%205%2C%208%5D%29)
- $\displaystyle 1, 2, 4, 8, 16, 32, \ldots = \left[ 64, 128, 256 \right]$

  `next_terms([1, 2, 4, 8, 16, 32], 3)`

  In the solver, `next_terms([1, 2, 4, 8, 16, 32], 3)` gives `[64, 128, 256]`.

  [Open in the solver](https://hilberon.com/?q=next_terms%28%5B1%2C%202%2C%204%2C%208%2C%2016%2C%2032%5D%2C%203%29)

## Related functions

- [numeric_product](https://hilberon.com/library/numeric_product)

  Multiply an expression over a range, as a decimal.
- [find_sequence_function](https://hilberon.com/library/find_sequence_function)

  The formula of a sequence from its first terms, given only when it also predicts two more.
- [numeric_sum](https://hilberon.com/library/numeric_sum)

  Add up an expression over a range, as a decimal.
- [find_linear_recurrence](https://hilberon.com/library/find_linear_recurrence)

  The recurrence a list of terms obeys, given only when it also holds on two more.
- [product](https://hilberon.com/library/product)

  Product of an expression over one or more ranges.
- [differences](https://hilberon.com/library/differences)

  The differences between neighbouring elements of a list.

---
Source: https://hilberon.com/library/next_terms
