middle_square, an Octave code which implements the middle square algorithm for generating random integers. This is a very early method, attributed to von Neumann, which actually is deeply flawed, with short cycles.
The information on this web page is distributed under the MIT license.
middle_square is available in a C version and a C++ version and a Fortran90 version and a MATLAB version and an Octave version and a Python version.
collatz, an Octave code which computes and analyzes the Collatz or hailstone or 3n+1 sequence;