Pseudo-random number generators remain one of the most amazing things in computing IMO. Knuth volume 2. One of my favourite books.