Number Sequence Calculator
A professional-grade number sequence calculator for students, educators, and engineers. Paste your terms, auto-detect the pattern (arithmetic, geometric, polynomial by finite differences, or Fibonacci-like), predict the next terms, and get the nth-term formula in LaTeX.
Calculator
Results
Your results will appear here. Enter your terms and press Calculate.
Data Source and Methodology
Authoritative references:
- R. L. Graham, D. E. Knuth, O. Patashnik. Concrete Mathematics: A Foundation for Computer Science, 2nd ed., Addison-Wesley, 1994. Finite differences and Newton's forward formula.
- The On-Line Encyclopedia of Integer Sequences (OEIS), 2025. https://oeis.org
Tutti i calcoli si basano rigorosamente sulle formule e sui dati forniti da questa fonte.
The Formula Explained
Arithmetic: \( a_n = a_1 + (n-1)\,d \)
Geometric: \( a_n = a_1 \cdot r^{\,n-1} \)
Polynomial via finite differences (Newton forward): \( a_n = \sum_{k=0}^{m} \binom{n-1}{k}\,\Delta^{k}a_1 \)
Fibonacci-like: \( a_n = a_{n-1} + a_{n-2} \)
Glossary of Variables
- Sequence Terms: The numbers you provide (e.g., 3, 7, 11, 15).
- Detection Mode: Auto-detect or force a specific model (Arithmetic, Geometric, Polynomial, Fibonacci-like).
- Next terms: How many future terms to compute after your last supplied term.
- N (nth term): The index n for which the calculator returns a_n.
- Tolerance: Allowed numerical error when testing constant differences or ratios.
- Common difference (d): For arithmetic sequences, d = a_n − a_{n−1}.
- Common ratio (r): For geometric sequences, r = a_n / a_{n−1} (when previous term ≠ 0).
- Δ^k a_1: The kth forward difference at the first term (finite differences table).
Worked Example
How It Works: A Step-by-Step Example
Suppose the sequence is 3, 7, 11, 15, 19. The first differences are 4, 4, 4, 4 (constant), so the pattern is arithmetic with d = 4.
\( a_n = a_1 + (n-1)\,d = 3 + (n-1)\cdot 4 \)
For n = 25: \( a_{25} = 3 + 24\cdot 4 = 99 \). The next five terms after 19 are 23, 27, 31, 35, 39.
Frequently Asked Questions (FAQ)
What sequence types can this tool handle?
Arithmetic, geometric, Fibonacci-like, and polynomial sequences identified with finite differences (e.g., quadratic, cubic).
How do finite differences work?
By computing successive differences until they become constant, the tool detects a polynomial pattern. With degree m, the nth term is expressed via binomial coefficients and the initial differences.
Why does my geometric ratio look slightly off?
Floating-point noise can create small deviations. Adjust the tolerance (e.g., 1e-6) to account for rounding errors.
Can the calculator sum the first n terms?
Yes for arithmetic and geometric sequences. The tool shows partial-sum formulas when those patterns are detected.
What if zeros appear in a geometric sequence?
A ratio is undefined if a previous term is 0. The tool will reject geometric detection in such cases unless all terms are 0 (which is treated as arithmetic with d = 0).
Is there a guarantee for predictions?
If your data perfectly matches the detected model (e.g., a true polynomial of degree m), predictions are exact. Otherwise, extrapolations are best-effort based on the chosen model.