> > > > Checking Goldbach's conjecture with code < < < <
Create:  2016-10-19 Update:  2016-10-19 Views:  1262 Tags:  Goldbach's conjecture,check Goldbach's conjecture with code

Goldbach's conjecture is one of the oldest and best-known unsolved problems in number theory and all of mathematics. It states: Every even integer greater than 2 can be expressed as the sum of two primes. The conjecture has been shown to hold for all integers less than 4 × 1018, but remains unproven despite considerable effort. The above is from wikipedia. This programe will check Goldbach's conjecture from 2 to 10 million with php code. It takes about 25 minute.

Goldbach's conjecture screenshots Goldbach's conjecture screenshots Goldbach's conjecture screenshots


  1. Taking an even integer from 2 to 10 million to the program's loops in order.
2. Using the prime pool, circulating the prime pool, then plus every two of the 
   prime numbers as a result, if the result equal to the loops even integer, 
   then break, otherwise continue. 

3. Splitting loops even integer to two parts in average. 
   If one of the results is an odd integer, continue.  
   If one of the results is even integer, then plus 1. 
   The other one minus. Then we get two odd integers. 

4. Judging these two odd integer, if they are prime integer, 
   it means, this even integer in this circulation is right to the Goldbach's conjecture, 
   puting these two prime integer to the prime pool, then go to the next circulation. 
   If they are not prime integer, then minus one of the number of 2, 
   the other number plus 2, continuing the judgement until the number to 1. 
   If the number equals 1, that means Goldbach's conjecture is wrong!


  1. Excluding 2, 3 ,5, 7 multiple.
2. Taking the prime integer to the prime pool in counting. At the next loop.
   Taking priority comes from prime pool to calculate.


--| Home |-- --| Others |-- --| About Us |-- --| Downloads |--