If we let `a _{n}` be

a= (41/24)(_{n}n- 1)(n- 2)(n- 3)(n- 4) + 1

then we have

a= 1_{1}

a= 1_{2}

a= 1_{3}

a= 1_{4}

a= 42_{5}

Therefore the next number might as well be 42. The same trick can be pulled off with any given integer sequence. In fact, it can be any number you like. This is not particularly hard to prove.

If we have been given a sequence of numbers

a,_{1}a,_{2}a,_{3}a_{4}

and we wish to find the value of `a _{5}`, then we are effectively being asked to find the the function

`f`(

`n`) such that

f(1) =a_{1}

f(2) =a_{2}

f(3) =a_{3}

f(4) =a_{4}

and then to evaluate `f`(5). Now, as we all know, if we are given any two points we can find a straight line through them. Given any three points we can find a parabola

f(x) =b_{2}x^{2}+b_{1}x+b_{0}

through them. Correspondingly, given any `n` points on a graph, we can find a polynomial of degree `n` - 1:

f(x) =b+_{0}b_{1}x+ ... +b_{n-1}x^{n-1}

which will go through of all of them. (Well, you can't if two points are directly above each other, but this is obviously impossible in this case.) This is called Lagrange interpolation. So suppose we know

f(1) =a_{1}

f(2) =a_{2}

...

f(n- 1) =a_{n-1}

and we want `a _{n}` to be 42. To find

`f`(

`x`), we have to solve the set of simultaneous equations;

f(1) =b+_{0}b+ ... +_{1}b=_{n-1}a_{1}

f(2) =b+ 2_{0}b+ ... + 2_{1}^{n-1}b=_{n-1}a_{2}

...

f(n) =b+_{0}nb+ ... +_{1}n^{n-1}b=_{n-1}a= 42_{n}

We have `n` equations with `n` unknowns (being the `b _{k}`). The solution will yield a polynomial

`f`(

`x`) which satisfies our simultaneous equations and additionally has

`f`(

`n`) =

`a`, for any given

_{n}`a`. So for any integer sequence, you can arbitrarily pick your own next number and find a polynomial that proves you correct.

_{n}This is a very pedantic point to make, but you have to be a pedant to be a mathematician, because making unjustified assumptions while answering questions can be catastrophic. However, often the answer in questions like these is either fairly obvious or easy to find, so while this technique is an entertaining party trick (if one is at a particularly dull party), it's usually quicker to just find the next integer by traditional methods.