And "e" Appears from Nowhere: Quick Numerical Experiment with Clojure
mostlymaths.net
mostlymaths.net
The proof appears right at the bottom.
PlusRandom <- function(initial, steps) {
if (initial > 1) steps
else PlusRandom(initial + urand(1), steps + 1)
}
mean(replicate(100000, PlusRandom(0,0))
[1] 2.71872Pretty awesome really.