Skip to content

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

find_linear_recurrence function

The recurrence a list of terms obeys, given only when it also holds on two more.

How to write it

find_linear_recurrence(terms)

An equation a(n + r) = ... in the terms before it, not the list of its coefficients.

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

Examples

  • 1,1,2,3,5,8,…⇒a(n+2)=a(n)+a(n+1)\displaystyle 1, 1, 2, 3, 5, 8, \ldots \Rightarrow a(n+2) = a(n)+a(n+1)
    find_linear_recurrence([1, 1, 2, 3, 5, 8])

    In the solver, find_linear_recurrence([1, 1, 2, 3, 5, 8]) gives a(n + 2) = a(n) + a(n + 1).

    Open in the solver
  • 1,3,9,27,81,243,…⇒a(n+1)=3a(n)\displaystyle 1, 3, 9, 27, 81, 243, \ldots \Rightarrow a(n+1) = 3 a(n)
    find_linear_recurrence([1, 3, 9, 27, 81, 243])

    In the solver, find_linear_recurrence([1, 3, 9, 27, 81, 243]) gives a(n + 1) = 3a(n).

    Open in the solver
  • find_sequence_function

    The formula of a sequence from its first terms, given only when it also predicts two more.

  • differences

    The differences between neighbouring elements of a list.

  • next_terms

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

  • sum_convergence

    Test whether the sum of an expression over a variable converges.

  • numeric_product

    Multiply an expression over a range, as a decimal.

  • sum

    Sum of an expression over one or more ranges.