**PROBLEM LINK:**

**Author:** rahul_ojha_07

**Tester:** horsbug98

**DIFFICULTY:**

EASY

**PREREQUISITES:**

Modulo Operation, Basic Mathematics

**PROBLEM:**

Given the First and Second number of a series, you have to find the **N ^{th}** number of the series.

**QUICK EXPLANATION:**

**N ^{th}** number of the series can be found using the formula

**n*(n+1) ÷ 2**

**EXPLANATION:**

The 1^{st} element of the series is 1 and the 2^{nd} element of the series is 3.

lets find the 3^{rd} number using the given formula in the question.

**B**=(_{i}**B**+_{i-1}**B**- 1) ÷ 2_{i+1}As we know the 1st and 2nd element of the series so for getting the 3rd element of the series we have to change the equation a little bit,

Now,By changing the equation we get,

**B**=(_{i+1}**2B**-_{i}**B**+ 1)_{i-1}Now to get the 3rd element of the series putting i=2,

we get **B _{3}** = 6.

We can see the Series following a pattern here i.e.

- For i=1 ->

**B**= 1

_{1}- For i=2 ->

**B**= 3

_{2}- For i=3 ->

**B**= 6

_{3}**i**Natural numbers. We can clearly see that for i=1

**S**= 1

_{1}for i=2 **S _{2}** = 1 + 2 = 3

for i=3 **S _{3}** = 1 + 2 + 3 = 6.

and so on

We can further verify this by the concept of mathematical induction.

So, As the series follows the sum of natural numbers so we can get the sum up to **i ^{th}** terms by the following formula

**Note:**The Series of number 1 3 6… is also known as Triangular numbers

**Author’s solution can be found here.**