Code tool

Quadratic Sequence Calculator

Enter consecutive terms starting at n = 1. A formula is shown only when every supplied term matches the fitted model within the stated tolerance.

In-browser processingNo account requiredPrivacy details ↗

Enter 4–20 decimal numbers, separated by commas or whitespace. Tolerance: |x − p| ≤ 10⁻⁹ + 10⁻⁹ max(|x|, |p|).

A QUICK WALKTHROUGH

How to use this tool

  1. Enter 4–20 numbers separated by commas or whitespace.
  2. Enter an integer target position n ≥ 1.
  3. Fit the first three terms, check all terms, and review the conditional result.

Model and indexing

Positions are consecutive integers beginning at 1. Let d = x₂ − x₁ and s = x₃ − 2x₂ + x₁. The model is aₙ = x₁ + (n − 1)d + (n − 1)(n − 2)s/2. In aₙ = An² + Bn + C, A = s/2, B = d − 3A, C = x₁ − A − B. Zero second difference permits linear or constant models.

Tolerance and limits

Every supplied value x is checked against prediction p with |x − p| ≤ 10⁻⁹ + 10⁻⁹ max(|x|, |p|). Numbers use browser floating point; inputs, intermediate calculations and results must be finite and no larger in magnitude than 9,007,199,254,740,991. The target must be a safe integer. No formula is given for a mismatch.

Interpretation and privacy

Finite samples can fit many different continuations. Matching this degree-at-most-two model does not establish a unique infinite sequence. The target value assumes this model continues. Calculations stay in your browser.

GOOD TO KNOW

Common questions

Does a match prove the pattern?

No. It only checks the supplied terms under this particular model and tolerance.