The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.

Find the sum of all the primes below two million.

First typed in solution was simply:

Which got me a number pretty quickly that looked lovely, but was completely
wrong. I ran it again, apparently hoping that’d it magically be right
the second time. Then I tried for those below 1000000 instead and the sum was
negative. Oops! So, the quick fix and working version (changing the
“int” range to “bigint” range):

I wonder if there’s a checked-overflow-arithmetic version of F#? Might
be useful for some of these questions, since they’re so computationally
light anyway.