Project Euler Problem 9 in F#