# Limits of Sequences¶

Provides methods to compute limit of terms having sequences at infinity.

sympy.series.limitseq.difference_delta(expr, n=None, step=1)[source]

Difference Operator.

Discrete analog of differential operator. Given a sequence x[n], returns the sequence x[n + step] - x[n].

References

Examples

>>> from sympy import difference_delta as dd
>>> from sympy.abc import n
>>> dd(n*(n + 1), n)
2*n + 2
>>> dd(n*(n + 1), n, 2)
4*n + 6

sympy.series.limitseq.dominant(expr, n)[source]

Finds the dominant term in a sum, that is a term that dominates every other term.

If limit(a/b, n, oo) is oo then a dominates b. If limit(a/b, n, oo) is 0 then b dominates a. Otherwise, a and b are comparable.

If there is no unique dominant term, then returns None.

Examples

>>> from sympy import Sum
>>> from sympy.series.limitseq import dominant
>>> from sympy.abc import n, k
>>> dominant(5*n**3 + 4*n**2 + n + 1, n)
5*n**3
>>> dominant(2**n + Sum(k, (k, 0, n)), n)
2**n

sympy.series.limitseq.limit_seq(expr, n=None, trials=5)[source]

Finds limits of terms having sequences at infinity.

Parameters: expr : Expr SymPy expression for the n-th term of the sequence n : Symbol The index of the sequence, an integer that tends to positive infinity. trials: int, optional The algorithm is highly recursive. trials is a safeguard from infinite recursion in case the limit is not easily computed by the algorithm. Try increasing trials if the algorithm returns None.

References

 [R455] Computing Limits of Sequences - Manuel Kauers

Examples

>>> from sympy import limit_seq, Sum, binomial
>>> from sympy.abc import n, k, m
>>> limit_seq((5*n**3 + 3*n**2 + 4) / (3*n**3 + 4*n - 5), n)
5/3
>>> limit_seq(binomial(2*n, n) / Sum(binomial(2*k, k), (k, 1, n)), n)
3/4
>>> limit_seq(Sum(k**2 * Sum(2**m/m, (m, 1, k)), (k, 1, n)) / (2**n*n), n)
4
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "http://docs.sympy.org/dev/modules/series/limitseq.html", "fetch_time": 1529823849000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2018-26/segments/1529267866888.20/warc/CC-MAIN-20180624063553-20180624083553-00554.warc.gz", "warc_record_offset": 93783782, "warc_record_length": 4083, "token_count": 556, "char_count": 1846, "score": 3.53125, "int_score": 4, "crawl": "CC-MAIN-2018-26", "snapshot_type": "latest", "language": "en", "language_score": 0.6177805066108704, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00006-of-00064.parquet"}