“We can never decide for sure that a number is random, but what we can do is apply an increasing number of tests and treat our sequence of numbers as innocent until proved guilty.”
Source Colva Roney-Dougal, Senior Lecturer in Pure Mathematics at the University of St Andrews, speaking in 'Random and Pseudorandom', BBC 'In our time' Jan. 2011.
Although the tests can show that a finite sequence of numbers appears to be random (i.e. it can't be mathematically represented in a shorter form) - there is currently no mathematical method to prove that if it continues, the next numbers in the sequence won't start to repeat.
“I can never prove that a sequence of numbers is random, I can only say that it looks and smells random given all the tests I've been able to apply so far.”
A number of 'tests' have been developed to gauge how random a sequence of numbers might be. They include statistical tests, transforms, and measures of complexity - or a mixture of these.
Also see :