Project Euler Problem 14 in F#