Page "Pseudorandom number generator" Paragraph 12
from
Wikipedia
An early computer-based PRNG, suggested by John von Neumann in 1946, is known as the middle-square method.
The algorithm is as follows: take any number, square it, remove the middle digits of the resulting number as the " random number ", then use that number as the seed for the next iteration.
For example, squaring the number " 1111 " yields " 1234321 ", which can be written as " 01234321 ", an 8-digit number being the square of a 4-digit number.
Page 1 of 1.
2.570 seconds.