Free tool · Math and study
Number sequence solver
Enter a list of numbers and the solver finds the pattern, writes the rule in words and as a formula, and gives the next five terms and any term you pick.
- Free
- No sign-up
- Runs in your browser
23, 27, 31, 35, 39Arithmetic sequence: Add 4 each time.
- Arithmetic sequence
- 5 terms given
- Rule in words
- Add 4 each time.
- Formula for the nth term
- a(n) = 4n − 1
- Next terms
- 23, 27, 31, 35, 39
- Term number 10
- 39
| n | Term | Difference | Second |
|---|---|---|---|
| 1 | 3 | ||
| 2 | 7 | 4 | |
| 3 | 11 | 4 | 0 |
| 4 | 15 | 4 | 0 |
| 5 | 19 | 4 | 0 |
| Step | What happens |
|---|---|
| 1 | Differences between neighbours: 4, 4, 4, 4. They are all equal, so this is an arithmetic sequence with a common difference of 4. |
| 2 | The formula is first term + (n − 1) × difference = 3 + (n − 1) × 4, which simplifies to 4n − 1. |
How to use the Number Sequence Solver
- Type your numbers in order into Your numbers, in order, separated by commas or spaces.
- Optional: type a number in Find the term number to get, say, the 10th term.
- Read the next five terms, the rule in words and the formula for the nth term.
- Follow How the rule was found to see the check that was made, and press Copy the answer to keep it.
How do I find the rule of a number sequence?
Look at how each number relates to the one before it. There are three quick tests. First subtract each term from the next one to get the differences. If they are all the same, the rule is to add that number every time. Second, divide each term by the one before to get the ratios. If these are all the same, the rule is to multiply. Third, if the differences are not the same, subtract again to get the differences of the differences. If those are the same, the sequence is quadratic.
For 3, 7, 11, 15, 19, the differences are 4, 4, 4, 4. They never change, so the rule is to add 4 each time, and the next terms are 23, 27, 31, 35, 39. The solver runs these tests in order and stops at the first one that fits.
The nth term formula lets you jump straight to any place. For this sequence it is a(n) = 4n − 1. Put n = 10 in it and you get 39, with no need to count up through the other terms.
How do I tell an arithmetic from a geometric sequence?
An arithmetic sequence adds the same amount each step, so its graph is a straight line. A geometric sequence multiplies by the same amount each step, so it grows or shrinks faster and faster. 2, 6, 18, 54 is geometric: each ratio is 3, the rule is "Multiply by 3 each time.", and the formula is a(n) = 2 × 3^(n − 1). The next terms are 162, 486, 1458, 4374, 13122.
A ratio between 0 and 1 gives a sequence that shrinks, like 16, 8, 4, 2. A negative ratio flips the sign each time, like 1, −2, 4, −8. The solver keeps every number as an exact fraction, so a ratio such as one third does not pick up rounding mistakes.
| Sequence | Kind | Formula | Next term |
|---|---|---|---|
| 5, 10, 15, 20 | Arithmetic | a(n) = 5n | 25 |
| 100, 90, 80, 70 | Arithmetic | a(n) = −10n + 110 | 60 |
| 3, 6, 12, 24 | Geometric | a(n) = 3 × 2^(n − 1) | 48 |
| 81, 27, 9, 3 | Geometric | a(n) = 81 × (1/3)^(n − 1) | 1 |
| 1, 4, 9, 16, 25 | Quadratic | a(n) = n² | 36 |
| 1, 3, 6, 10, 15 | Quadratic | a(n) = 0.5n² + 0.5n | 21 |
| 2, 1, 3, 4, 7 | Fibonacci-type | a(n) = a(n − 1) + a(n − 2) | 11 |
| 1, 4, 2, 9, 7 | No simple rule found | – | – |
What are quadratic and Fibonacci-type sequences?
In a quadratic sequence the differences themselves change by a steady amount. Take 2, 5, 10, 17, 26: the differences are 3, 5, 7, 9 and the second differences are 2, 2, 2. Half of the second difference is the number in front of n², so the formula is a(n) = n² + 1, and the next terms are 37, 50, 65, 82, 101. The triangle numbers 1, 3, 6, 10, 15 are another case, with the formula a(n) = 0.5n² + 0.5n.
A Fibonacci-type sequence has no constant differences. Each term is the sum of the two terms before it: 1, 1, 2, 3, 5, 8, then 13, 21, 34, 55, 89. The solver looks for this pattern with any two starting numbers, and it needs four terms to be sure.
A quadratic fit needs four terms for the same reason. Any three numbers can be put on some curve, so three terms cannot prove it. That is why the page asks for four or more numbers when you want a firm answer.
What if the solver says no simple rule fits?
Some lists have no simple pattern. For 1, 4, 2, 9, 7 the solver shows the differences and the ratios and says so, instead of making up a rule. A short list of numbers can always be matched by some complicated formula, so a rule is only worth trusting when it is simple and fits every term.
The solver checks four families: add a number, multiply by a number, a steady change in the differences, and the sum of the last two terms. Cubes, powers of two with an offset, primes, and digits of a number are not covered. If your sequence is one of those, the differences table can still give you a hint.
When each step is a percent more than the last, the percentage calculator works out one step of it. To spot the factors that make up a term, try the factors of a number page, for growth by a steady percent over time, the exponential growth calculator, and for very large terms, the scientific notation calculator converts them.
Use it with
- Factors of a Number: list every factor, the factor pairs and the prime factors.
- Scientific Notation Converter: standard form both ways.
- Fraction Calculator: add, subtract, multiply, divide fractions with steps.
Questions
How do I find the next number in a sequence?
Work out the differences and the ratios. For 3, 7, 11, 15, 19 the differences are all 4, so the next number is 23.
What is the nth term of 3, 7, 11, 15, 19?
a(n) = 4n − 1. The 10th term is 39.
How do I know if a sequence is geometric?
Divide each term by the one before. If every answer is the same, it is geometric. For 2, 6, 18, 54 it is 3 each time.
What is the next term of 1, 1, 2, 3, 5, 8?
13. Each term is the sum of the two before it, so 5 + 8 = 13.
How many terms do I need?
Three are enough to spot an arithmetic or geometric rule. Quadratic and Fibonacci-type rules need four, since three numbers fit too many patterns.
Can a sequence have more than one rule?
Yes. A finite list always fits many rules. The solver gives the simplest one it knows, and it says so when none of its rules fit.
The tool's results are computed in your browser by the code on this page; the explanations are checked against the tool's own output.