Project Euler Problem 17 in F#