# Arithmetic Sequence Calculator

> Computes the n-th term and the sum of the first n terms of an arithmetic progression from the first term and the common difference, and lists the first terms.

- Calculator id: `arithmetic-sequence` · Category: Math (`math`) · Tool name: `calculate_arithmetic_sequence`
- Canonical page: https://tttkmbb.com/math/arithmetic-sequence · This document: https://tttkmbb.com/math/arithmetic-sequence.md · JSON definition: https://tttkmbb.com/math/arithmetic-sequence.json

## Purpose

Computes the n-th term and the sum of the first n terms of an arithmetic progression from the first term and the common difference, and lists the first terms.

**Use when:** Terms increase or decrease by a constant amount (e.g. 2, 5, 8, …) and you need a specific term or the total of the first n terms.

**Do not use when:** Terms are multiplied by a constant ratio (use geometric-sequence) or you need interest that compounds (use compound-interest).

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `first_term` | number |  | required | The first term of the sequence. |
| `common_difference` | number |  | required | Amount added to each term to get the next (negative for a decreasing sequence). |
| `n` | integer |  | required | Index of the term to compute and the number of terms to sum. (min 1, max 1000000000) |

## Output

| Field | Type | Unit | Description |
| --- | --- | --- | --- |
| `nth_term` | number |  | a₁ + (n − 1) × d. |
| `sum` | number |  | n × (a₁ + aₙ) / 2. |
| `first_terms` | number_list |  | The first min(n, 10) terms of the sequence. |
| `explicit_formula` | string |  | The formula for the general term with the given values. |

## Formula

`aₙ = a₁ + (n − 1)·d; Sₙ = n·(a₁ + aₙ)/2 = n·(2a₁ + (n − 1)·d)/2`

## Data Sources

- Wikipedia – Arithmetic progression — https://en.wikipedia.org/wiki/Arithmetic_progression (reference, retrieved 2026-09-23)
- Wolfram MathWorld – Arithmetic Series — https://mathworld.wolfram.com/ArithmeticSeries.html (reference, retrieved 2026-09-23)

Data freshness: `static`. Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output.

## API

- `GET https://tttkmbb.com/api/v1/calculate/arithmetic-sequence?first_term=…&common_difference=…&n=…`
- `POST https://tttkmbb.com/api/v1/calculate/arithmetic-sequence` with JSON body `{"inputs": {…}}`
- Response: unified envelope (`success`, `request`, `result.values`, `result.units`, `sources`, `freshness`, `timestamp`, `next_actions`, `links`); see https://tttkmbb.com/docs/response-format.md
- Schema: https://tttkmbb.com/api/v1/calculators/arithmetic-sequence · OpenAPI operationId `calculate_arithmetic_sequence` in https://tttkmbb.com/openapi.json
- Authentication: none. Rate limit: fair use, see https://tttkmbb.com/docs/rate-limits.md.

## MCP

- Server: `https://tttkmbb.com/mcp` (Streamable HTTP, JSON-RPC 2.0, no auth)
- Tool:  `run_calculator` with `{"calculator_id": "arithmetic-sequence", "inputs": {…}}`

## Example

- 2, 5, 8, … (10 terms): inputs `{"first_term":2,"common_difference":3,"n":10}` → `{"nth_term":29,"sum":155,"first_terms":[2,5,8,11,14,17,20,23,26,29],"explicit_formula":"a_n = 2 + (n − 1) × 3"}`
- 5, 3, 1, … (6 terms): inputs `{"first_term":5,"common_difference":-2,"n":6}` → `{"nth_term":-5,"sum":0,"first_terms":[5,3,1,-1,-3,-5]}`

```
GET https://tttkmbb.com/api/v1/calculate/arithmetic-sequence?first_term=2&common_difference=3&n=10
```

## Limitations

Terms are multiplied by a constant ratio (use geometric-sequence) or you need interest that compounds (use compound-interest). All values are computed from the formula above; no measurement or live data is involved.

## FAQ

**How do I find d from two terms?**

d = (a_m − a_k) / (m − k). For a₁ = 2 and a₄ = 11, d = (11 − 2) / 3 = 3.

**Can the sum be zero or negative?**

Yes. With a negative common difference the terms eventually become negative and the partial sums can decrease, as in 5, 3, 1, −1, −3, −5 whose sum is 0.

## Related

- [Geometric Sequence Calculator](https://tttkmbb.com/math/geometric-sequence.md) — Sequences with a constant ratio instead of a constant difference.
- [Simple Interest Calculator](https://tttkmbb.com/finance/simple-interest.md) — Simple interest grows linearly like an arithmetic sequence.
