コンテンツへスキップ

This page is also in English.

Read it in English

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

Léela en español

本页也有简体中文版本。

阅读简体中文版本

項から数列の式を求める(find_sequence_function)

最初の項から数列の一般項を求めます。さらに2項を予測できる場合にのみ返します。

書き方

find_sequence_function(terms, variable)

各項を与える a(n) の式と、それに続く項。1項足りない場合は手がかりとして規則を示します。

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

    項の列が従う漸化式。さらに2項でも成り立つ場合にのみ返します。

  • next_terms

    リストに続く項。規則がそれを説明し、さらに二つを予測できる場合にのみ与えられます。

  • numeric_product

    範囲にわたって式を掛け合わせ、小数で求めます。

  • differences

    リストの隣り合う要素の差。

  • numeric_sum

    範囲にわたって式を足し合わせ、小数で求めます。

  • sum_convergence

    変数についての式の和が収束するかどうかを判定します。