Source: wikibot/middle-square-method
= Middle-square method
{wiki=Middle-square_method}
The Middle-square method is an early algorithm used for generating pseudorandom numbers. It was introduced by the mathematician John von Neumann in the 1940s. The basic idea of the method is to take the square of a number, and then extract the middle digits of the result to form a new number. This new number can then be squared again, and the process can be repeated to generate a sequence of pseudorandom numbers.