# How to solve the sequence: $87, 89, 95, 107, ?, 157$

This question appeared in a competitive exam. The question is:

Q. Find the unknown term in $87,89,95,107,?,157$

1)127 $\ \ \ \ \ \ \ \$ 2)122
3)139 $\ \ \ \ \ \ \ \$ 4)140

I tried very much to solve it but can't find the correct answer. Any hints will be appreciated.

Edit:

My effort that I did before asking this question:

I calculated the difference b/w consecutive terms. The diff is $2,6,12,20$. I was not able to recognize any pattern. After this I subtracted each term, which is less than 100, from 100 and, subtracted 100 from each term which is greater than 100. The resultant sequence is is $13,17,11,5,7,x,y$. Again I could not recognize any pattern.

Source

It was asked in SBI Clerical Exam 27-05-2012. It is the 110th question of that exam.

• – Shaun Jun 3 '14 at 10:37
• Yes, but one could be perfectly forgiven for thinking it's $128$ and that $127$ is a typo. (I think just about any number could be valid if your reason for choosing it is sophisticated enough.) – Shaun Jun 3 '14 at 10:46
• @Shaun I am not getting you. Your first comment links to the sequence 87, 89, 95, 107, 128, 152. My question's sequence is 87,89,95,107,?,157 – user103816 Jun 3 '14 at 13:11
• Ah, I see; my mistake. Sorry! – Shaun Jun 3 '14 at 15:28
• @Shaun You are somehow right. This type of questions suck. One can show all the 4 options correct. Someone has explained me this. In this question 3rd option 139 can be shown correct as: wolframalpha.com/input/…*FVarOpt.1-_**InterpolatingPolynomialCalculator.data--.***InterpolatingPolynomialCalculator.data2---.-- – user103816 Jun 3 '14 at 16:48

The expected answer is probably something like this:

Each column is the difference of the previous column

   A   B   C   D
--------------
87
2
89       4
6       2
95       6
12       2
107       8
20       2
?127?     10
30
157


However, we can fit any number in the unknown spot with the proper function. Each of the following polynomials has $f_k(0)=87$, $f_k(1)=89$, $f_k(2)=95$, $f_k(3)=107$, $f_k(5)=157$, yet $$\begin{array}{l} f_1(n)=87\binom{n}{0}+2\binom{n}{1}+4\binom{n}{2}+2\binom{n}{3}&\text{gives }f_1(4)=127\\ f_2(n)=87\binom{n}{0}+2\binom{n}{1}+4\binom{n}{2}+2\binom{n}{3}-5\binom{n}{4}+25\binom{n}{5}&\text{gives }f_2(4)=122\\ f_3(n)=87\binom{n}{0}+2\binom{n}{1}+4\binom{n}{2}+2\binom{n}{3}+12\binom{n}{4}-60\binom{n}{5}&\text{gives }f_3(4)=139\\ f_4(n)=87\binom{n}{0}+2\binom{n}{1}+4\binom{n}{2}+2\binom{n}{3}+13\binom{n}{4}-65\binom{n}{5}&\text{gives }f_4(4)=140\\ \end{array}$$ All the possible answers have an explanation in terms of these polynomials.

• I do not understand your answer. Would you elaborate it? – user103816 Jun 4 '14 at 16:13
• @user31782: I have added some extra explanation. If you still have questions, let me know what they are. – robjohn Jun 4 '14 at 17:24
• As far I know $\dbinom nk\, = {^n}C_r$, where $n \geq r$. How do I calculate $f_1(1)$, that is $f_1(1)$ contains terms like $\dbinom 12\,$, that is $-1!$. – user103816 Jun 4 '14 at 17:39
• @user31782: No. For $k,n\in\mathbb{Z}$, $\displaystyle\binom{n}{k}=0$ if $k\lt0$ or $0\le n\lt k$. To be precise, $$\binom{n}{k}=\frac{n(n-1)(n-2)\cdots(n-k+1)}{k!}$$ – robjohn Jun 4 '14 at 17:43

Hint:
The difference between each term goes like this: $2,6,12.$ Can you notice any pattern? Based on it, can you prove that the next term in it is $20$?

The difference of the difference between the numbers is increased by two each time. Therefore the answer is probably 127, although as always, if you're creative enough you could probably invent some story to motivate any of the other answers.

I've recognized the patteren. The general term is
$a_n=a_{n-1} +b_n$ for $n>1$, where $b_n=b_{n-1}+2n$ for $n>1$. $a_1=87$ and $b_1=2$.

Take the difference between the terms (1st difference): that's $2,6,12,..$

Now take the difference between those (2nd difference): that's $4,6...$

Guess the likely second difference continuation: $4,6,8,10,...$

Hence the likely first difference continuation would be: $2,6,12,20,30...$

Finally, the sequence would be: $87,89,95,107,127,157$. You're on the right track because the final term matches up and the second last term is one of the given options.

So the expected answer is 1) $127$.