CORRECTED VERSION BY THE AUTHOR:
1.- Fix the number D of digits desired for the integer random number.
2.- Take an integer S as seed with L digits (L >= 7)
Take another integer k with 3 or more digits
3.- k = k + 7 : S = S + k
4.- Multiply it by 4 and substract 1.
5.- Extract its square root Q with L or more decimals.
6.- Take F = fractional part of Q.
7.- Multiply F by 10^D
8.- Take its integer part : This is the random number R with D or
less
digits. That is: R = INT(10^D*F)
9.- Multiply F by 10^L and take the integer part. That is: S = INT
(10^L*F)
10.- Go to instruction 3