# sequence of numbers

I remember reading that 'the next number in a sequence of numbers can be anything. It is all about finding the a relation between previous numbers such that the required number becomes next in sequence'.

For e.g: take the sequence 3,5,7...

1. The next number can be 9, if we look at the sequence as A.P with common difference of 2.
2. The next number can be 11, if we look at the sequence as sequence of prime numbers...

Basically it can be anything, if we can think of a relationship between the numbers...

I can't remember the name of the paradox. Can somebody help me?

Thanks, tecMav.

• I wouldn't call it a paradox - it's a fact. I can fit a polynomial, for example, given a finite number of points. Add another point, I can still fit a polynomial (of higher degree if the new point isn't on the old polynomial). – Mark Bennet Oct 30 '12 at 17:32
• en.wikipedia.org/wiki/Lagrange_polynomial – xavierm02 Oct 30 '12 at 17:44
• What is the next number in the sequence $0,1,0,1,0,1,\dots$? Actually, it is $7$, I asked my colleagues in turn how many children they had. What is the next number in the sequence $1,2,3,4,5,6,7,8,9,10,11,12,\dots$? It is $1$, I have been clock-watching. – André Nicolas Oct 30 '12 at 18:42
• Thanks for the replies. But this wasn't the answer I was looking for. The statement I am referring to does not deal with finding the correct next number in sequence. All it says is "it is possible that the next number can be anything. All you have to do is find a reason to fit that number into the sequence'. For e.g, what is the next number in sequence 3,5,7.. It can be 9 based on fact that the difference between numbers is 2, or it can be 11, if you go by treating them as sequence of odd numbers...so if you can find a apt reasoning the next number can be anything... – tecMav Oct 31 '12 at 8:53
• That one would need to find a[n] apt reasoning to allow some specific value of the next number is a misconception of what a sequence is. (In this respect, while exact, the argument that there exists a polynomial fitting the next value, whatever this next value is, might be misleading, in the end.) – Did Oct 31 '12 at 13:30

## 2 Answers

Among all "programs" producing an infinite sequence with the given beginning there is a shortest one. Occam's razor tells you to use this program in order to produce the next term in the sequence.

• Unfortunately which program is the shortest is going to depend on the computational model and the encoding... – mjqxxxx Oct 31 '12 at 13:39
• For those interested, a rigorous way to define complexity is by Kolmogorov complexity with respect to some encoding, which is often taken to be some Turing-complete programming language. – user21820 Jun 6 '14 at 6:49
• And a minor point: Only computable sequences can be produced by programs, so Kolmogorov complexity doesn't apply to non-computable sequences. And only definable sequences can be subject to Occam's razor, so Occam's razor doesn't apply to non-definable sequences. – user21820 Jun 6 '14 at 6:52

What Mark Bennet,xavierm02 and in a different way André Nicolas are saying is that whatever the next term in the sequence is, there is a relation that gives you that first terms of the sequence (this relation can be (a Lagrange) polynomial $f(n)$).

For example suppose that you have the sequence $3,5,7,\ldots .$ The next term can be $100$ and the relation giving your sequence can be $f(n)$ with $f=\frac{91}{6}x^3-91x^2+\frac{1013}{6}x-90$.