As others have said, ‘truly random’ numbers cannot be computed. The computer instead measures something chaotic in its environment, such as electrical noise, atmospheric fluctuations, radiation detection from a Geiger counter, etc.
*Pseudo-random* numbers can be generated by algorithm however. There are many possible algorithms offering different properties: the amount of numbers generated before repeating for example; speed of algorithm, etc.
An example of one simple algorithm is the ‘linear congruential generator’, which basically brings out the natural randomness in the divisibility properties of integers.
Latest Answers