Created
May 14, 2011 06:58
-
-
Save gnp/972003 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. | |
Find the sum of all the primes below two million. | |
---------- | |
In Mathematica: | |
In[1]:= s = 0; p = 2; While[p < 2000000, s += p; p = NextPrime[p]]; s | |
Out[1]= 142913828922 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment