Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I have a sequence of numbers like 1,7,22,45,12,96,21,45,65,36,85,14,51,16,18,17,16....65...

IS there any formula to check whether the sequence is random or not ?

In my case

  1. odd numbers are not random since previous+2
  2. even numbers are not random
  3. the numbers can be repeated in a sequence but must be far away,
  4. we cannot generate the sequence using any formula like (x+2)^2 -2x like...
share|cite|improve this question

marked as duplicate by bwv869, user127096, voldemort, Mario Carneiro, Claude Leibovici Apr 12 '14 at 4:53

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

And how do you define random? – Sasha Sep 28 '12 at 14:20
@Sasha In my case 1.odd numbers are not random since previous+2 2.even numbers are not random 3.the numbers can be repeated in a sequence but must be far away, 4.we cannot generate the sequence using any formula like (x+2)^2 -2x like... – cc4re Sep 28 '12 at 14:21
Would the distant digits of $\pi$ count as random - even though they are computable? Randomness is a difficult concept to capture, and is also very important, since the generation of random (or pseudorandom - ie looking random on common tests) numbers is commercially important [think codes and confidential communication]. A readily computable formula or algorithm to identify and predict all pseudorandom sequences would have significant consequences in the real world. – Mark Bennet Sep 28 '12 at 14:33
Your property 3. is opposite to randomness. – Did Sep 28 '12 at 15:18
Maybe this will be of interest: – Byron Schmuland Sep 28 '12 at 15:33

There is a very good discussion of this question in Seminumerical Algorithms, which is Volume 2 of Knuth's The Art Of Computer Programming.

share|cite|improve this answer

First of all you have to tell what "random" means...

But in the algorithmic context there is a nice definition.

To be more specific: a number $\alpha\in(0,1)$ is algorithmically random if for every $n$ the size of the shortest program giving you the first $n$ bits of $\alpha$ is at least $n$ bits long.

You can encode your sequence as a binary representation of some number from the interval $[0,1]$ and try to check if it is algorithmically random.

But do not count on a formula that can tell you if a particular number (sequence) is random since such a formula cannot exist.

See "Algorithmically random sequence" "Chaitin constant" and "halting problem" in Wikipedia for more details.

share|cite|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.