# How to use OESIS (On-line Encyclopedia of Integer Sequences)

Last Updated : 10 Feb, 2018

We sometimes land up in a situation whenÂ various coding problems can be simplified to a mathematical formula but often finding that formula isnâ€™t that straightforward .Here comes, OESIS for rescue. We can calculate the terms for initial indices i.e n=0,1,2,3,â€¦â€¦..Â and then may use OEIS to find the mathematical expression.

This article focuses on usingÂ OEIS (On-line Encyclopedia of Integer Sequences) to solve many complex problems easily by formulating them in some sort of mathematical expression. OEIS is a massive encyclopedia where we can look for various sequences and find their mathematical expression,examples and related facts about them .

Lets try to understand using an example: You are given n balls and are supposed to make equilateral triangleÂ as shown in the image below.Each subsequent pattern should add a new row Â to the triangle.

Now if we see the sequence of dots being added to form triangle,

The first few numbers are `1, 3, 6, 10, 15`

This problem is known asÂ Â triangular numberÂ which counts the objects that can form an equilateral triangle,. The nth triangular number is the number of dots composing a triangle with n dots on a side, and is equal to the sum of the n natural numbers from 1 to n. The sequence of triangular numbers starting at the 0th triangular number, is:

0, 1, 3, 6, 10, 15 ….

Now we have got the sequence and if we search it onÂ OEISÂ ,we get the following result:

OESIS proves extremely helpful in finding the algorithm to solve the problem.OEIS records information on integer sequences of interest to both professional mathematicians and amateurs, and is widely cited. As of 22 August 2015 it contains over 260,000 sequences, making it the largest database of its kind.