Thread: New Code
View Single Post
Old 2011-09-01, 00:48   #2
Christenson's Avatar
Dec 2010

5×359 Posts

That bit of programming is a simple verification of Goldbach's conjecture:

"Every even number can be expressed as the sum of two primes."

The program (if you add the correct braces) searches for small counterexamples. It needs some editing, since it needs to make output when it finds a counterexample, and a number of limits have been omitted.

They use the list of primes as a way to avoid repeatedly testing numbers for primality. Undoubtedly, the function IsPrime() also uses the list.

Last fiddled with by Christenson on 2011-09-01 at 00:49
Christenson is offline   Reply With Quote