Counting & Number Theory
Second-Order Integer Recurrence & Partial Sum Calculator
Generate a sequence term and partial sum from two starting values and a constant-coefficient recurrence.
How the calculation works
For n≥2, compute u(n)=a×u(n−1)+b×u(n−2). Keep the previous two exact integer terms and an exact running sum. n=0 and n=1 return the supplied initial values directly; the partial sum includes both endpoints.
Worked example
Example inputs — Coefficient a multiplying previous term: 1; Coefficient b multiplying second-previous term: 1; Term u(0): 0; Term u(1): 1; Term index n: 10. Expected results — Requested term u(n): 55; Sum of terms u(0) through u(n): 143.
Assumptions and limits
Exact integer arithmetic is used for counts and integer results. Computation limits keep this browser tool responsive. Specify whether objects/groups are distinguishable and whether order matters; different conventions count different outcomes. Signed integer coefficients and initial terms, at most 25 characters each; n≤1000. Fibonacci, Lucas and other choices share this general recurrence tool rather than separate default-only pages. No arbitrary recurrence expressions, noninteger coefficients or variable coefficients are accepted.
Reference and further reading
Read the underlying subject reference. Calculith is an independent implementation; the reference does not endorse or certify this tool.
Related calculators
- Modular Power, Inverse & Bezout Calculator
- Chinese Remainder & Compatible Congruences Calculator
- Prime Factorization, Divisors & Totient Calculator
- Exact Integer Base 2–36 Converter
- Decimal to Best Bounded-Denominator Fraction Calculator
Example values are editable. Results are estimates where assumptions apply. Calculations run in your browser. Updated 2026-11-16.