跳转到内容

This page is also in English.

Read it in English

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

Léela en español

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

日本語で読む

由项求数列通项公式(Formula of a sequence from its terms,find_sequence_function)

由开头若干项求数列的公式;仅当它还能预测另外两项时才给出。

怎么写

find_sequence_function(terms, variable)

给出每一项的公式 a(n),以及跟在它后面的项;若少一项,则以规则作为提示。

terms
开头的若干项,整数或分数,第一项为 a(1)。接受一个列表。
variable
公式的指标,如 n 这样的名字。接受一个变量或变量列表。

示例

  • 1,4,9,16,25,…⇒n2\displaystyle 1, 4, 9, 16, 25, \ldots \Rightarrow n^{2}
    find_sequence_function([1, 4, 9, 16, 25], n)

    在求解器中,find_sequence_function([1, 4, 9, 16, 25], n) 的结果是 n^2。

    在求解器中打开
  • 1,1,2,3,5,8,13,21,…⇒fibonacci⁡(n)\displaystyle 1, 1, 2, 3, 5, 8, 13, 21, \ldots \Rightarrow \operatorname{fibonacci}(n)
    find_sequence_function([1, 1, 2, 3, 5, 8, 13, 21], n)

    在求解器中,find_sequence_function([1, 1, 2, 3, 5, 8, 13, 21], n) 的结果是 fibonacci(n)。

    在求解器中打开
  • 1,2,6,24,120,…⇒n!\displaystyle 1, 2, 6, 24, 120, \ldots \Rightarrow n!
    find_sequence_function([1, 2, 6, 24, 120], n)

    在求解器中,find_sequence_function([1, 2, 6, 24, 120], n) 的结果是 n!。

    在求解器中打开
  • 2,3,5,5,8,7,…⇒{3n+12if n mod 2=1n+1otherwise\displaystyle 2, 3, 5, 5, 8, 7, \ldots \Rightarrow \begin{cases} \frac{3 n+1}{2} & \text{if } n \bmod 2 = 1 \\ n+1 & \text{otherwise} \end{cases}
    find_sequence_function([2, 3, 5, 5, 8, 7], n)

    在求解器中,find_sequence_function([2, 3, 5, 5, 8, 7], n) 的结果是 piecewise((3n + 1)/2 if n % 2 = 1, n + 1 otherwise)。

    在求解器中打开
  • 3,8,17,32,57,100,177,…⇒n2+2n\displaystyle 3, 8, 17, 32, 57, 100, 177, \ldots \Rightarrow n^{2}+2^{n}
    find_sequence_function([3, 8, 17, 32, 57, 100, 177], n)

    在求解器中,find_sequence_function([3, 8, 17, 32, 57, 100, 177], n) 的结果是 n^2 + 2^n。

    在求解器中打开
  • find_linear_recurrence

    一个项列表所满足的递推关系;仅当它在另外两项上也成立时才给出。

  • next_terms

    列表之后的项:仅当某条规则能解释它并预测出另外两项时才给出。

  • numeric_product

    在某个范围内对表达式求乘积,以小数表示。

  • differences

    列表中相邻元素之差。

  • numeric_sum

    在某个范围内对表达式求和,以小数表示。

  • sum_convergence

    检验表达式关于某个变量的和是否收敛。