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
next_terms([1, 4, 9, 16, 25])In the solver,
Open in the solvernext_terms([1, 4, 9, 16, 25])gives[36, 49, 64, 81, 100].next_terms([1, 1, 2, 3, 5, 8])In the solver,
Open in the solvernext_terms([1, 1, 2, 3, 5, 8])gives[13, 21, 34, 55, 89].next_terms([1, 2, 4, 8, 16, 32], 3)In the solver,
Open in the solvernext_terms([1, 2, 4, 8, 16, 32], 3)gives[64, 128, 256].
Related functions
- numeric_product
Multiply an expression over a range, as a decimal.
- find_sequence_function
The formula of a sequence from its first terms, given only when it also predicts two more.
- numeric_sum
Add up an expression over a range, as a decimal.
- find_linear_recurrence
The recurrence a list of terms obeys, given only when it also holds on two more.
- product
Product of an expression over one or more ranges.
- differences
The differences between neighbouring elements of a list.