Generally speaking it's not possible to predict the next number in a series.
Here's an example:
1, 1, 2, 3...
You could interpret this as the Fibonacci sequence, which would continue like this:
1, 1, 2, 3, 5, 8, 13, 21....
Or you could interpret it as the natural numbers where every third number is repeated
1, 1, 2, 3, 4, 4, 5, 6, 7, 7, 8, 9...
Or you could interpret it as the natural numbers where every fourth number is repeated
1, 1, 2, 3, 4, 5, 5, 6, 7, 8, 9, 9, 10, 11, 12...
Let's say somebody wanted to be a pain and they challenged you to come up with the rule for a sequence of numbers, and you came up with a perfectly good explanation for the sequence so far. The other guy could always say "no, that rule's not right, it's actually this other rule" no matter how long the given prefix of the sequence was.
If somehow the domain of rules is restricted, say to polynomials of a certain max degree, or recurrence relations of a certain form, then it is sometimes possible to narrow down the rule to a single one. But in the general case with no restrictions, it's impossible.