# Recurrence relation explorer

- Human page: https://happytails.ai/en/calculators/recurrence-relation-explorer/
- Markdown: https://happytails.ai/en/calculators/recurrence-relation-explorer.md
- Structured JSON: https://happytails.ai/agents/en/calculators/recurrence-relation-explorer/index.json
- Visibility: public

## Tool capabilities

| Property | Value |
| --- | --- |
| Tool ID | `recurrence-relation-explorer` |
| Category | calculators |
| Implementation | Registered implementation. Registration alone is not a production-quality guarantee. |
| Browser execution | Use the visible action or interactive controls. |
| Browser processing | Browser; see tool notes for network behavior. |
| HTTP API | Not callable through HTTP. |
| Browser-agent interface | run_current_tool |

### Implementation notes

Expands the recurrence exactly on your device and solves linear recurrences with constant coefficients in closed form, up to order 10.

### Inputs and settings

Text input: Recurrence and initial values.

Example or placeholder shown in the interface (not a validated fixture):

```text
a(n) = a(n-1) + a(n-2), a(0) = 0, a(1) = 1
```

Write the recurrence first, then initial values separated by commas or new lines. Up to 1,000 characters. Review the settings before running.

| Setting | Meaning | Control type | Default | Constraints |
| --- | --- | --- | --- | --- |
| `terms` | Number of terms | number | "20" | min=1 max=200 step=1 |

### Browser-agent workflow

1. Open the human page in a browser that supports WebMCP.
2. Discover the interface exposed by that page; use its actual schema.
3. Select files on the page first when the tool requires files.
4. Call `run_current_tool` with valid input and settings.
5. Inspect the returned result or error and the displayed output. Retrieve files from the displayed download links.

Calls do not automatically copy or download results. Browser permissions still apply. Interface availability alone is not proof of successful execution.

### Planning specification

Inputs are limited to 1,000 characters, order 10, forcing polynomials of degree 3 and 1 to 200 terms; exact values may grow to 1,024 digits. Everything is computed on your device in a background worker with a 15 second limit. Downloads are a JSON report and a CSV of terms.

This describes intended requirements. Use the implementation notes, interface schema and observed output to determine current support.

### Complete machine-readable capability record

```json
{
  "id": "recurrence-relation-explorer",
  "category": "calculators",
  "built": true,
  "requirements": "Inputs are limited to 1,000 characters, order 10, forcing polynomials of degree 3 and 1 to 200 terms; exact values may grow to 1,024 digits. Everything is computed on your device in a background worker with a 15 second limit. Downloads are a JSON report and a CSV of terms.",
  "implementation": {
    "fields": [
      {
        "key": "terms",
        "label": "Number of terms",
        "value": "20",
        "type": "number",
        "min": 1,
        "max": 200,
        "step": 1,
        "help": "How many terms to list, from 1 to 200, including the initial values."
      }
    ],
    "presentation": "metrics",
    "inputCodeDirection": "ltr",
    "registrationFamily": "exact-math-discrete",
    "inputMaxLength": 1000,
    "inputErrorCode": "EXACT_MATH_DISCRETE_EXPRESSION_TOO_LONG",
    "note": "Expands the recurrence exactly on your device and solves linear recurrences with constant coefficients in closed form, up to order 10.",
    "experience": {
      "automatic": false,
      "single": false,
      "inputMaxLength": 1000,
      "inputMode": "text",
      "label": "Recurrence and initial values",
      "placeholder": "a(n) = a(n-1) + a(n-2), a(0) = 0, a(1) = 1",
      "help": "Write the recurrence first, then initial values separated by commas or new lines. Up to 1,000 characters. Review the settings before running.",
      "helpParts": [
        "Write the recurrence first, then initial values separated by commas or new lines.",
        "Up to 1,000 characters.",
        "Review the settings before running."
      ],
      "action": null
    },
    "mode": "explicit",
    "interactive": false
  },
  "execution": "Browser interface",
  "api": null,
  "browser_agent": {
    "supported": true,
    "name": "run_current_tool",
    "discovery": "WebMCP on the human page in a supporting browser",
    "verification": "See audit/API-AUDIT.md; availability is not verification"
  }
}
```

## Page guide

List the terms of a recurrence exactly and, for linear recurrences with constant coefficients, find the closed form from the characteristic roots. You can also check your own guess against every computed term.

### How to use Recurrence relation explorer

1. Type the recurrence and initial values, such as a(n) = a(n-1) + a(n-2), a(0) = 0, a(1) = 1.
2. Optionally add a guess, such as guess: a(n) = 2^n - 1, and choose how many terms to list.
3. Run the explorer and read the terms, the characteristic roots and the closed form.
4. Download the JSON report or the CSV of terms.

How can we improve this tool?

Report a problem or share an idea.

Please leave out private information. Your message and the tool name go to our team via PostHog.

## Useful next steps

- [Fractions](https://happytails.ai/en/calculators/fractions/) ([Markdown](https://happytails.ai/en/calculators/fractions.md))

- [Combinations and permutations calculator](https://happytails.ai/en/calculators/combinations-calculator/) ([Markdown](https://happytails.ai/en/calculators/combinations-calculator.md))

- [Partition and composition calculator](https://happytails.ai/en/calculators/partition-and-composition-calculator/) ([Markdown](https://happytails.ai/en/calculators/partition-and-composition-calculator.md))

Inputs are limited to 1,000 characters, order 10, forcing polynomials of degree 3 and 1 to 200 terms; exact values may grow to 1,024 digits. Everything is computed on your device in a background worker with a 15 second limit. Downloads are a JSON report and a CSV of terms.

## Closed forms

For a(n) = c1 a(n-1) + ... + ck a(n-k) + f(n) with a polynomial f, the characteristic polynomial is factored exactly. Each root r of multiplicity m contributes r^n, n r^n and so on, a polynomial particular solution handles f, and the constants come from the initial values. Rational roots and roots of the form p + q\*sqrt(d) are supported. Method: Rosen, Discrete Mathematics and Its Applications, 8th edition, section 8.2 (2019).

### Checks

The closed form is evaluated exactly at every computed term and must match. A guess is compared term by term; agreement on finitely many terms is evidence, not proof.

### Other recurrences

Nonlinear recurrences such as a(n) = n\*a(n-1) are expanded exactly but get no closed form. Complex characteristic roots and roots of cubic or higher factors are reported as not supported instead of guessed.
