TOPICS
Search

Pseudorandom Number


A pseudorandom number is a number generated by a deterministic procedure intended to imitate a random number. The prefix pseudo- distinguishes such numbers from results obtained from a random physical process such as radioactive decay.

An early example is the middle-square method (von Neumann 1951). For a decimal state x of width 2m with m a positive integer, square x, pad the square on the left with zeros to width 4m, and retain the middle 2m digits as the next state. In arithmetic terms the next state is the remainder of |_x^2/10^m_| modulo 10^(2m).

There are only 10^(2m) states. Once a state repeats, determinism forces all later states to repeat with the same period, so the sequence is eventually periodic with period at most 10^(2m). This bound does not ensure a long cycle. For example, with width four the seed 2500 yields 2500 again because its padded square is 06250000. The state zero is also fixed.


See also

Quasirandom Sequence, Random Number

Explore with Wolfram|Alpha

References

Luby, M. Pseudorandomness and Cryptographic Applications. Princeton, NJ: Princeton University Press, 1996.Press, W. H.; Flannery, B. P.; Teukolsky, S. A.; and Vetterling, W. T. Numerical Recipes in FORTRAN: The Art of Scientific Computing, 2nd ed. Cambridge, England: Cambridge University Press, p. 266, 1992.von Neumann, J. "Various Techniques Used in Connection with Random Digits." In Monte Carlo Method, National Bureau of Standards Applied Mathematics Series 12, pp. 36-38, 1951. https://mcnp.lanl.gov/pdf_files/InBook_Computing_1961_Neumann_JohnVonNeumannCollectedWorks_VariousTechniquesUsedinConnectionwithRandomDigits.pdf.Veritasium. "Randomness Is a Lie. Let Me Explain." Nov. 18, 2026. https://www.youtube.com/watch?v=uXuQF_PPg5U.

Referenced on Wolfram|Alpha

Pseudorandom Number

Cite this as:

Weisstein, Eric W. "Pseudorandom Number." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/PseudorandomNumber.html

Subject classifications