Source: https://goodhandover.co.uk/tools/linear-recurrence-calculator/

[Computer science maths](https://goodhandover.co.uk/tools/computer-science-maths/#year-2) / Year 2

🔒 Files never leave your device

# Linear recurrence calculator

Generate exact terms of an integer recurrence from seed values and coefficients. Your inputs stay on your device.

## Set up your task

Ready. Processing stays in this browser.

Files and text stay on your device. [Privacy details](https://goodhandover.co.uk/privacy/).

 

## How to use Linear recurrence calculator

Generate exact terms of an integer recurrence from seed values and coefficients. The pre-filled problem gives you a worked starting point. Compare the response with your own working before trying the self-check below.

 

- Check the example inputs: Initial values (from a(0)), Coefficients (most recent term first), Terms including seeds.

- Change the inputs for your problem. Results update as you type, so finish entering the values before copying an answer.

- Use the working to check an intermediate value or assumption. Then change the example as suggested in the self-check and compare the result.

 

## Supported inputs and limits

Enter one to six seed values and the same number of coefficients, with the coefficient on the most recent term first. Generate up to 40 terms.

 

## How it works

A linear recurrence builds every later term from a weighted sum of a fixed number of earlier terms. Seeds supply the first values before that rule can run. The most recent term gets the first coefficient, the second-most-recent gets the next coefficient, and so on.

Iteration is one way to verify an example before deriving a closed form. A list of computed terms can reveal an off-by-one index, an incorrectly ordered coefficient or a mistaken initial value. This tool uses signed exact integers even for values that would exceed ordinary floating-point integer precision.

 

## Example

Run the pre-filled example. Its first result is “Term a(9): 34”.

Initial values (from a(0))

0 1

Coefficients (most recent term first)

1 1

Terms including seeds

10

Term a(9): 34
a(0) = 0
a(1) = 1
a(2) = 1
a(3) = 2
a(4) = 3
a(5) = 5
a(6) = 8

 

## Questions about Linear recurrence calculator

### Is count the number of new terms to generate?

Count includes the seed values. With two seeds and count five, the calculator adds three terms and ends at a(4).

### Why do coefficients and seeds have the same length?

Each coefficient needs a previous value at the first recurrence step. The seeds provide exactly that history.

### Use one seed 3, one coefficient −2, and four terms.

Expect a(0) = 3, a(1) = −6, a(2) = 12 and a(3) = −24. Negative coefficients can produce alternating signs.

 
 

## Related tools

[Year 2: Algorithms and theory](https://goodhandover.co.uk/tools/computer-science-maths/#year-2)

- [Master theorem calculator](https://goodhandover.co.uk/tools/master-theorem-calculator/)

- [DFA simulator](https://goodhandover.co.uk/tools/dfa-simulator/)

- [Longest common subsequence calculator](https://goodhandover.co.uk/tools/longest-common-subsequence-calculator/)

- [NFA to DFA converter](https://goodhandover.co.uk/tools/nfa-to-dfa-converter/)

 

Last updated 24 November 2026
