Project Euler Problem 18 in F#