# finding nth term

Let 3,8,17,32,57 . . . . . be a pattern.How do we find the nth number?My brains are completely jammed,I am tired.I do not even recognize the pattern.I calculated a few ways,but all I want is a little hint,not the whole solution.

-
Any finite sequence can be extended in literally any way you want. There is no answer for what the sequence "should" be. – Zev Chonoles May 16 '13 at 17:46
@Zev Why nitpick? Yes, that's true, but I suspect (and this isn't a terribly difficult matter to ascertain) that the OP is looking for a satisfactory way to define the terms, assuming there is a pattern... – amWhy May 16 '13 at 17:48
There you go,I edited it,happy? – rahul May 16 '13 at 17:50

Note: I just added a derivation of an explicit formula for the terms as the OP requested.

From 3,8,17,32,57, if the term is n, the next term is 2n+k where k = 2, 1, -2, -7.

The differences of k are -1, -3, -5.

If we assume that the next difference is -7, the next k is -7-7=-14 and the next term is 2*57-14 = 100.

To get a formula from this, since the sum of the odd numbers are the squares, the values of k are $2-m^2$ starting with $m = 0$.

Letting $s(0) = 3$, $s(n+1) = 2s(n)+2-n^2$. This is made explicit below.

Check: $s(1) = 2*3+2-0 = 8$, $s(2) = 2*8+2-1 = 17$, $s(3) = 2*17+2-4 = 32$, $s(4) = 2*32+2-9 = 57$.

To get an explicit form for $s(0) = 3$, $s(n+1) = 2s(n)+2-n^2$ let $s(n) = 2^n t(n)$. Then $2^{n+1}t(n+1) = 2^{n+1}t(n)+2-n^2$, or $t(n+1) = t(n) + 1/2^{n}-n^2/2^n$, so $t(n+1) - t(n) = 1/2^{n}-n^2/2^n$.

Summing this, $t(m)-t(0) = \sum_{n=0}^{m-1} (t(n+1) - t(n)) = \sum_{n=0}^{m-1} (1/2^{n}-n^2/2^n) = 1-1/2^m - \sum_{n=0}^{m-1}n^2/2^n$.

To evaluate the last sum, let $f(x) = \sum_{n=0}^{m-1} x^n = (1-x^m)/(1-x)$. Then $x f'(x) = \sum_{n=0}^{m-1} nx^n$ and $x (x f'(x))' = \sum_{n=0}^{m-1} n^2 x^n$.

We want $x (x f'(x))'$ at $x = 1/2$.

Note that $x (x f'(x))' = x (f'(x) + x f''(x)) = x f'(x) + x^2 f''(x)$.

I'm feeling lazy, so I won't bother getting $f'$ and $f''$.

-

If you want the smallest degree polynomial that gives these numbers (which is only one of the infinitely many possible explanations for them), we can use the calculus of finite differences: $$\fbox{3}\quad 8\quad 17\quad 32\quad 57 \\ \fbox{5}\quad 9\quad 15\quad 25\\ \fbox{4}\quad 6\quad 10\\ \fbox{2} \quad 4\\ \fbox{2}$$ Define \begin{align*} f(n)&=3\binom{n}{0} +5\binom{n}{1}+4\binom{n}{2}+2\binom{n}{3}+2\binom{n}{4}\\\\ &=3 + \frac{19 n}{6} + \frac{23 n^2}{12} - \frac{n^3}{6} + \frac{n^4}{12} \end{align*} Then $$f(0)=3,\quad f(1)=8,\quad f(2)=17,\quad f(3)=32,\quad f(4)=57$$

-
Ah,I was counting 32=17+16.That is why I could find no pattern. – rahul May 16 '13 at 17:56

Hint: One solution can be obtained by taking differences-of-differences.

-
Already did.Did not seem to make much sense,but I will concentrate a bit more. – rahul May 16 '13 at 17:51
The next number in the differences-of-differences can be chosen to be 16 to complete one possible pattern. – response May 16 '13 at 17:54