Recursive Sequence Calculator

Enter a recursive rule and its first term.

Use n, a(n-1) and a(n-2), like a(n) = a(n-1) + a(n-2).

The value of a(1): a number or fraction.

The value of a(2). Only needed when the rule uses a(n-2).

A whole number from 1 to 50.

Try

Result

You enteredan=2an−1+1a_{n} = 2a_{n-1} + 1

1,  3,  7,  15,  31,  63\displaystyle 1,\; 3,\; 7,\; 15,\; 31,\; 63

Next term

127\displaystyle 127

Sum of these terms

120\displaystyle 120
Show the work
  1. Recurrence relation

    A recursive rule gives each term from the terms before it, so the sequence is built one term at a time from the starting value given. Here nn is the position of the term being found.

    an=2an−1+1a1=1\begin{gathered} a_{n} = 2a_{n-1} + 1 \\ a_{1} = 1 \end{gathered}
  2. Working out term 2

    Put n=2n = 2 and the earlier term into the rule.

    a2=2×1+1=3\begin{aligned} a_{2} &= 2 \times 1 + 1 \\ &= 3 \end{aligned}
  3. Working out term 3

    Put n=3n = 3 and the earlier term into the rule.

    a3=2×3+1=7\begin{aligned} a_{3} &= 2 \times 3 + 1 \\ &= 7 \end{aligned}
  4. Table of terms

    All 6 terms, in order.

    n123456an137153163\begin{array}{c|cccccc} n & 1 & 2 & 3 & 4 & 5 & 6 \\ \hline a_n & 1 & 3 & 7 & 15 & 31 & 63 \end{array}
  5. Result

    The first 6 terms are: 1,  3,  7,  15,  31,  631,\; 3,\; 7,\; 15,\; 31,\; 63.

Worked examples