## Saturday, 1 August 2015

### Nth Term

A couple of days back I stumbled upon this website: nth-test.com. Nth Test is an nth-child and nth-of-type tester. It requires you to input an nth term of a sequence and it displays the sequence formed corresponding to that nth term. What it basically does is that it calculates the Arithmetic Progression (A.P.) for that nth term. So for example if we input 2n-1, it will output the progression: 1, 3, 5, 7 ... on a tabular block in an interactive way. It makes calculating the nth child easier.

So I came out with Nth Term that does the exact opposite of the above explained concept. It takes the sequence (Arithmetic Progression) as input and displays the nth term for it. It also extends the input sequence and highlights the numbers on a table.

So suppose you need the nth term for the following sequence: 5, 9, 13 ...
All you need to do is type the numbers in the input form separated by commas and you will get the nth term and the extended sequence for the input.

I have defined n as a Natural Number, i.e. n ∈ N. So n can only take values from the set: { 1, 2, 3, 4, ... }. You may enter values of n and check if the output series is correct in the table.

For n = 1, 4n+1 = 5
For n = 2, 4n+1 = 9
For n = 3, 4n+1 = 13
For n = 4, 4n+1 = 17

... and so on.

You may have noticed a smiley to the left of the input form. A smile : ) means a hit, i.e. the nth term has been found. A sad face : ( means the series is not an A.P. and when it is waiting for a proper input by you, it would display an "indifferent" smiley : |