What is a random sequence?
It is a sequence of independent random numbers with a specified distribution
uniform distribution (equally probable).
History
The sequence is not random, but it appears to be. Sequences generated
in a deterministic way are usually called pseudo-random sequences. "middle
square" has proved to be a comparatively poor source of random numbers.
If zero appear as a number of the sequence, it will continually
perpetuate itself. Metropolis showed that when 20 bit numbers
are being used, there are 13 different cycles into which the sequence might
generate, the longest of which has a period of length 142. On the
other hand with 38-bit numbers he obtained about 750,000 numbers
that passed statistical tests
for randomness. Many random number generators in use today are
not very good. There is
a tendency for people to avoid learning anything about such subroutines.
Super random number generator (Knuth page 4-5)
Algorithm K
This algorithm when first put onto a computer, it almost immediately converged to the 10-digit value 6065038420, which -- by extraordinary coincidence-- is transformed into itself by the algorithm (see table 1)
The moral of the story is that random numbers should not be generated with a method chosen at random. Some theory must be used.
Generating uniform random numbers
Un = Xn / m
Un real random numbers uniformly distributed between zero and
one.
Xn an interger between 0 and m. Usually m is the word size of
the computer.