{
    "name": "Number Sequence Calculator",
    "url": "https://calculators.geekmidst.com/calculators/number-sequence-calculator",
    "markdown": "https://calculators.geekmidst.com/calculators/number-sequence-calculator.md",
    "category": "Mathematics",
    "description": "Find the nth term and the sum of the first n terms of an arithmetic, geometric or Fibonacci sequence, plus the infinite sum where it exists.",
    "summary": "Enter how a sequence starts and how it grows, and get any term, the running total of the first n terms and the first ten terms listed.",
    "also_called": [
        "Arithmetic sequence calculator",
        "Geometric series calculator",
        "nth term calculator"
    ],
    "applies_to": "Worldwide",
    "last_updated": "2026-10-29",
    "computation": "Results are computed in the visitor’s browser on the HTML page. This API describes the calculator; it does not compute results.",
    "inputs": [
        {
            "name": "seq_type",
            "label": "Sequence type",
            "type": "select",
            "default": "arithmetic",
            "options": {
                "arithmetic": "Arithmetic (add the same amount each time)",
                "geometric": "Geometric (multiply by the same ratio)",
                "fibonacci": "Fibonacci (1, 1, 2, 3, 5, …)"
            }
        },
        {
            "name": "a1",
            "label": "First term (a₁)",
            "type": "number",
            "default": "2"
        },
        {
            "name": "d",
            "label": "Common difference (d)",
            "type": "number",
            "default": "3",
            "shown_when": {
                "seq_type": "arithmetic"
            }
        },
        {
            "name": "r",
            "label": "Common ratio (r)",
            "type": "number",
            "default": "2",
            "shown_when": {
                "seq_type": "geometric"
            }
        },
        {
            "name": "n",
            "label": "Term number (n)",
            "type": "number",
            "default": "10"
        }
    ],
    "outputs": [
        {
            "key": "nth",
            "label": "nth term",
            "format": "number"
        },
        {
            "key": "sum",
            "label": "Sum of the first n terms",
            "format": "number"
        },
        {
            "key": "terms",
            "label": "First terms",
            "format": "text"
        },
        {
            "key": "infinite_sum",
            "label": "Sum to infinity",
            "format": "text"
        }
    ],
    "formula": {
        "text": "Arithmetic: aₙ = a₁ + (n − 1)d,  Sₙ = n(2a₁ + (n − 1)d) ÷ 2;  Geometric: aₙ = a₁·rⁿ⁻¹,  Sₙ = a₁(1 − rⁿ) ÷ (1 − r),  S∞ = a₁ ÷ (1 − r) for |r| < 1;  Fibonacci: Fₙ = Fₙ₋₁ + Fₙ₋₂",
        "variables": {
            "a₁": "first term",
            "d": "common difference",
            "r": "common ratio",
            "n": "position of the term"
        }
    },
    "worked_example": {
        "inputs": {
            "seq_type": "arithmetic",
            "a1": "2",
            "d": "3",
            "r": "2",
            "n": "10"
        },
        "steps": [
            "a₁₀ = 2 + (10 − 1) × 3 = 2 + 27 = 29.",
            "S₁₀ = 10 × (2 × 2 + 9 × 3) ÷ 2 = 10 × 31 ÷ 2 = 155.",
            "Check: the first and last terms average (2 + 29) ÷ 2 = 15.5, and 15.5 × 10 = 155."
        ],
        "result": "In 2, 5, 8, …, the 10th term is 29 and the first ten terms add up to 155."
    },
    "interpretation": "An arithmetic sequence grows by a fixed amount (like simple interest); a geometric one grows by a fixed factor (like compound interest), so it eventually outruns any arithmetic sequence when r > 1.",
    "assumptions": [
        "The first term is term number 1. Fibonacci starts F₁ = F₂ = 1."
    ],
    "limitations": [
        "Results are shown to 15 significant digits; very large geometric terms are approximate beyond that."
    ],
    "rules": null,
    "faqs": [
        {
            "question": "When does a geometric series have a finite sum to infinity?",
            "answer": "Only when the ratio is between −1 and 1. Then the terms shrink fast enough that the total approaches a₁ ÷ (1 − r); for example 1 + ½ + ¼ + … = 2."
        },
        {
            "question": "How do I find the common difference?",
            "answer": "Subtract any term from the next one. If the differences are not constant but the ratios are, the sequence is geometric."
        }
    ],
    "sources": [],
    "related": [
        {
            "name": "Exponent Calculator",
            "url": "https://calculators.geekmidst.com/calculators/exponent-calculator"
        },
        {
            "name": "Compound Interest Calculator",
            "url": "https://calculators.geekmidst.com/calculators/compound-interest-calculator"
        },
        {
            "name": "Simple Interest Calculator",
            "url": "https://calculators.geekmidst.com/calculators/simple-interest-calculator"
        }
    ],
    "disclaimer": null,
    "publisher": "GM¹X CalcVerse"
}