Omni Calculator logo

Learn how to calculate sequences of numbers or simply find the values of their term with our versatile tool! Keep reading this article to learn:

  • What numerical and integer sequences are;
  • The formulas to calculate a sequence's nth term (arithmetic and geometric sequences);
  • Interesting integer sequences (prime numbers, Fibonacci numbers, figurate numbers);
  • And much more.

We will teach you how to use our versatile tool and give you some examples of sequence calculations. What are you waiting for? Let's start counting!

What is a numerical sequence? What are integer sequences?

A numerical sequence is an ordered (enumerated) list of numbers where:

  • The order in which the numbers appear matters;
  • Repetition is allowed; and
  • Each term can be considered the output of a function where instead of an argument, we specify a position.

The terms of a sequence are (usually) represented by the letter aa followed by the position (or index) as subscript. Then, the first term of a sequence would be a0a_0, followed by a1a_1. A generic term in position nn is a(n+1)a_{(n+1)}.

Among many types of sequences, it's worth remembering the arithmetic and the geometric sequences.

Integer sequences

If each term of a sequence is an integer number, then we are dealing with integer sequences. While technically, there's not much difference from any other generic mathematical sequence; we can quickly calculate integer sequences by hand. Many integer sequences are well known. We can quote:

  • The Fibonacci sequence;
  • The prime numbers sequence;
  • The square and cube numbers; and
  • Many more.

How to calculate the arithmetic sequence: formula and definition

The arithmetic sequence is, arguably, the most common and straightforward of the mathematical sequences. An arithmetic sequence is a sequence where two adjacent terms differ by the same constant difference. In mathematical terms, we write this definition as:

an+1=an+da_{n+1} = a_n + d

where dd is the constant difference.

You can calculate a sequence defined this way by only knowing an initial value and dd: repeated subtractions and sums will eventually populate all possible positions.

For this reason, we can easily find the first term of the sequence (a0a_0) if we know the value at position nn and dd, or the n-th terms starting from the first one and dd. We use this formula, changing the position of the factors according to what we are looking for:

a0=annda_0 = a_n - n\cdot d

If you plot the terms of an arithmetic sequence, you'll find a straight line that, in the Cartesian coordinates, would have a slope equal to dd.

🙋 Head to our arithmetic sequence calculator for a complete analysis of this versatile numerical sequence!

Calculate the geometric sequence: formula and properties

In a geometric sequence, two adjacent terms have constant ratio rr. This ratio is given by the formula:

r=anan1r = \frac{a_n}{a_{n-1}}

Using this formula, we calculate the terms of a geometric sequence by simply multiplying (if we are moving forward) or dividing (if you are moving in the opposite direction) a term by rr:

an=ran1a_n = r\cdot a_{n-1}

To calculate the nth term of a geometric sequence starting from the initial term a0a_0, you can start by using the previous formula to calculate the sequences' first terms:

a1=ra0a2=ra1=rra0a3=ra2=rrra0\begin{split} a_1&= r\cdot a_0\\ a_2& = r\cdot a_1=r\cdot r\cdot a_0 \\ a_3&=r\cdot a_2= r\cdot r\cdot r\cdot a_0 \end{split}

As you can see, the constant ratio can be expressed as a power: r2r^2, r3r^3, and so on. So to calculate the nth term of a geometric sequence, we raise rr to the proper exponent:

an=rna0a_n = r^n \cdot a_0

A geometric sequence can grow extremely fast for constant ratios greater than 11, closely resembling the behavior of exponential growth.

Other type of "geometric" sequences: square, cubes, and triangles

Number theory and geometry meet in an unexpected way involving the so-called figurate numbers. A figurate number of items can be arranged in a specific geometric shape: a square number of dots, for example, can be arranged in a square. Take 3636, for example:

As you can see, we can arrange 3636 as a square with side 66.

The seventh square number, 36.

Square numbers are the most famous figurate number, closely followed by cube numbers. Their sequences are pretty straightforward.

For square numbers, the nth term is:

an=n2a_n = n^2

Similarly, for cube numbers, we have:

an=n3a_n = n^3

The first ten square numbers, starting from a0=0a_0=0 are:

a0=0a1=1a2=4a3=9a4=16a5=25a6=36a7=49a8=64a9=81\begin{split} a_0 &=0 \\a_ 1&=1 \\a_ 2&=4 \\a_ 3&= 9\\a_ 4&=16 \\a_5 &=25 \\a_6 &=36 \\a_7 &=49 \\a_ 8&=64 \\a_9 &=81 \\ \end{split}

The first ten cube numbers are:

a0=0a1=1a2=8a3=27a4=86a5=125a6=216a7=343a8=512a9=729\begin{split} a_0 &=0 \\a_ 1&=1 \\a_ 2&=8 \\a_ 3&= 27\\a_ 4&=86 \\a_5 &=125 \\a_6 &=216 \\a_7 &=343 \\a_ 8&=512 \\a_9 &=729 \\ \end{split}

Notice how quickly the last set grows compared to the former!

Triangular numbers are slightly less common, as they find fewer applications and remain mostly a niche mathematical curiosity. However, we think they are pretty cool, so we included them in our calculator!

The nth term of the sequence of triangular numbers is given by the following formula:

Tn=n(n+1)2=(n+12)T_n = \frac{n\cdot(n+1)}{2} = \binom{n+1}{2}

where the second equality introduces the concept of binomial coefficient.

The first set of triangular numbers are:

T0=0T1=1T2=3T3=6T4=10\begin{split} T_0 &=0 \\T_ 1&=1 \\T_ 2&=3 \\T_ 3&= 6\\T_ 4&=10 \end{split}

Maybe it's not evident, but there is a neat relationship between square numbers and triangular numbers. If you consider the same initial term a0=T0=0a_0=T_0=0, then:

an=Tn1+Tna_n = T_{n-1}+T_n

You can see this formula with your eyes:

Packing of triangular numbers
You can pack two adjacent triangular numbers and create a member of the sequence of the square numbers.

🙋 We made a complete tool dedicated to these numbers: visit the triangular numbers calculator!

Prime number sequence and Fibonacci sequence

There are two additional sequences of particular interest in number theory due to their properties and repeated appearances in mathematics. We are talking about prime numbers and Fibonacci numbers.

Prime numbers are numbers divisible only by themselves and by 11. We can use the ancient Erathostenes's sieve algorithm, but this method is not useful for large terms. Nowadays, it's easy to find tabulated sequences of prime numbers, such as this table of prime numbers up to 1000 billion. Here is a sequence of the first prime numbers


11 and 00 are not prime numbers, even though the former was a matter of a long debate!

Fibonacci numbers can be considered a twisted form of an arithmetic sequence, where the constant difference is not constant: instead, the difference between two adjacent numbers in the Fibonacci sequence is equal to the term right before both of them. In mathematical terms, we write:

anan1=an2a_{n} - a_{n-1} =a_{n-2}

which allows us to write the expression for the n-th term:

an=an1+an2a_{n} = a_{n-1} +a_{n-2}

There is no way to escape this constraint: even to start the sequence, we need to specify two Fibonacci numbers. By convention:

F0=0F1=1\begin{split} F_0&=0\\ F_1&=1 \end{split}

Knowing the first two terms, we can compute the third one:

a2=a0+a1=0+1=1a_2 = a_0+a_1 = 0+1 = 1

Yup, repetition is allowed. And while in other instances, this would cause the sequence to repeat itself, after the third term, the numbers of the Fibonacci sequence never repeat. The next terms would be:

a3=1+1=2a4=2+1=3a5=3+2=5a6=5+3=8a7=8+5=13\begin{split} a_3 &= 1+1=2\\ a_4 &= 2+1=3\\ a_5&=3+2=5\\ a_6&=5+3=8\\ a_7&=8+5=13 \end{split}

The difference between the terms increases, making the Fibonacci sequence almost an exponential one. To learn more about this curious, mathematical sequence, visit our Fibonacci calculator!

How to calculate the nth term of a sequence of powers of 2, factorial, and stars numbers

Powers of 2

We included another significant sequence in our calculator: the sequence of the powers of 2. This sequence is nothing but a geometric sequence with constant ratio r=2r=2 starting at a0=20=1a_0=2^0=1.

Even though it's "just" a geometric sequence, with the development of informatics, the powers of two became a staple of our civilization; hence they deserve this appearance!


Factorial numbers are interesting numbers where, if we set a1=1a_1=1, then ana_n is equal to the product of all integers between 11 and nn. In mathematical terms:

an=123...(n1)na_n = 1\cdot2\cdot3\cdot...\cdot(n-1)\cdot n

The first factorial numbers are:

a1=1=2a2=12=2a3=123=6a4=1234=24a5=1235=120\begin{split} a_1 &= 1=2\\ a_2 &= 1\cdot2=2\\ a_3&=1\cdot2\cdot3=6\\ a_4&=1\cdot2\cdot3\cdot4=24\\ a_5&=1\cdot2\cdot3\cdot5=120 \end{split}

Factorial numbers grow pretty quickly! In mathematics, they have an important role in combinatorics, the study of the ways we can arrange objects belonging to a set.

🙋 Factorial numbers are identified by an exclamation mark: 5!=1205! = 120. The number of jokes about this in mathematics is too high, at least 12! (=479001600=479001600).

Star numbers

The last sequence you will explore in our number sequence calculator is the star numbers, another class of figurate numbers where each term indicates the size of a collection of items you can arrange in a six-pointed star fashion. There is a neat formula to calculate the nth term of this sequence:

sn=6n(n1)+1s_n = 6\cdot n \cdot (n-1) + 1

The first star numbers are 1, 13, 37,...1,\ 13,\ 37,.... Here is a graphical representation of s2=37s_2=37

A graphical representation of the third star number.

How to use our sequence calculator

Our sequence calculator is a versatile tool. To use it, follow these simple steps:

  1. Choose the type of sequence you are interested in: use the drop-down menu at type.

  2. Fill the parameters of the desired sequence. What can we ask you?

    • We always ask you the initial position: this is the index of the first term of which you want to see the value. If you input 55, we will print the terms starting from a5a_5.

    • The first term of the sequence. This can help us find the terms starting at the selected position in the geometric and arithmetic sequence.

    • The constant ratio or constant difference if they appear in the sequence's formula.

  3. Once you fill in all the required, we will print the first five terms starting from the selected index.

🙋 Our calculators also work in reverse: if you input a correct number in one of the five positions, there's a chance we can calculate the other members and parameters. Explore this functionality!

Don't mistake sequence and series: discover their difference in the sum of series calculator.


What is the formula to calculate the arithmetic sequence?

The formula to calculate the arithmetic sequence is:

an = a0 + n × d


  • a0 — The first term of the series;
  • d — The constant difference between two adjacent terms; and
  • n — The position of the nth term.

You can easily derive this formula from the definition of arithmetic sequence:

an = an-1 + d

where you can substitute an-1 recursively:

an = an-2 + d + d

until you reach the initial term a0.

How do you calculate the Fibonacci sequence?

To calculate the Fibonacci sequence, follow these easy steps:

  1. Define the first term of the sequence: F0 = 0.
  2. Define the second term of the sequence: F1 = 1.
  3. Compute the third term as the sum of the previous ones: F2 = F0 + F1 = 0 + 1 = 1.
  4. Repeat the third step until you reach the desired position.

The first Fibonacci numbers are 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55,....

What are examples of number sequences?

A number sequence is a sequence of numbers (terms) identified by their position as members of a list. The most famous sequences are the arithmetic sequence and the geometric sequence. Other examples of sequences include:

  • The Fibonacci sequence;
  • The prime numbers sequence;
  • Sequence of square and cube numbers;
  • The powers of 2;

and many more.

How do you know if a sequence is geometric or arithmetic?

To find out if a sequence is geometric or arithmetic, you must follow some easy steps:

  1. Write down the terms of your sequence. Start choosing pairs of adjacent terms (in the form an and an+1).

  2. Calculate the difference between the adjacent terms in each pair. If the difference is the same for each pair, you are dealing with an arithmetic sequence.

  3. If the previous test failed, calculate the ratio between the two pairs of numbers. If it's constant for each pair, then you found a geometric sequence.

What is the 100th member of an arithmetic sequence with d = 5?

a99 = 495, assuming that the first term is zero (a0 = 0). To calculate this result, we used the formula to calculate the nth term of an arithmetic sequence:

an = a0 + n × d

where we substitute the values:

a99 = 0 + 99 × 5 = 495

Davide Borchia
Common difference (d)
Initial position (n)
Check out 10 similar sequences calculators 🔗
Arithmetic sequenceCollatz conjectureConvolution… 7 more
People also viewed…

Flat vs. round Earth

Omni's not-flat Earth calculator helps you perform three experiments that prove the world is round.

Meat footprint

Check out the impact meat has on the environment and your health.

Slope percentage

Our slope percentage calculator will help you understand what the 5% slope means and how to convert it to degrees.

Subtracting fractions

The subtracting fractions calculator helps you understand how to solve fraction subtraction problems.
Copyright by Omni Calculator sp. z o.o.
Privacy, Cookies & Terms of Service