--- from: http://rosettacode.org/wiki/Pseudo-random_numbers/Middle-square_method