Goldbach Conjecture

Math Day 6:

Goldbach Conjecture Trial in Python:

Because of the dramatical story of Chen jing run(陈景润), Chinese society has a special sentimental enthusiasm attached to the Goldbach Conjecture. Majority of the public think it is the most difficult and fascinating maths problem in the world.

The truth is Goldbach Conjecture is extremely easy to understand, yet remains unproven.

Goldbach’s Conjecture. Every even integer greater than 2 is the sum of two primes.


4=2+2, 6=3+3, 18=7+11…

Background Story:

In 1742, Christian Goldbach, an amateur mathematician, sent a letter to Leonhard Euler(e^i*π+1=0) in which he made the following conjecture: 

Every even number greater than 4 can be 
written as the sum of two odd prime numbers.

Euler didn’t take the letter seriously, regarding the result as trivial. I guess super wise man makes mistakes once a while, because the Goldbach conjecture, has not proven in 2019. 

in 2013, Zhang Yi Tang has established the first finite bound on the least gap between consecutive primes, which is a step closer to prove Twin- Prime conjecture, which may lead to the prove of Goldbach conjecture.

aingnamma / Pixabay

While I was in school, I m not considered as the top smart student’s category, however, I am definitely smart enough to NOT try to prove the Goldbach Conjecture. While “sitting there doing nothing” is not my style either, so I decided to execute the Goldbach Conjecture in Python. 

Goldbach Conjecture Python Trial:


#GoldBach Conjecture 

import math


def sieveSundaram():
    for i in range(1, int((math.sqrt(MAX)-1)/2)+1):
        for j in range((i*(i+1))<< 1, int(MAX/2)+1, 2*i+1):
    for i in range(1, int(MAX/2)+1):
        if (marked[i]==False):
def findPrimes(n):
    if (n <=2 or n % 2 !=0):
       print("Even Number");

    while (primes[i] <= n //2):
        if diff in primes:
            print(primes[i], "+", diff, "=", n);


#This code is contributed  by chandan_jnu


2 + 2 = 4

3 + 19 = 22

7 + 4993 = 5000

17 + 8783 = 8800

31 + 9967 = 9998


Personal Thoughts:

I have a bad habit, watching too much TV shows. Whenever maths is involved in the TV reality shows, the hosts always comments “OMG, so hard, genius” or “what is your opinion about the Goldbach Conjecture ?”. No doubt there are many genius in science, mathematics in particular, but all of them has to work hard. In addition, there are many worldwide maths problems such as Fermat’s Last Theorem (solved in 1993, Wiles ). Riemannian Hypothesis, Navier-Stroke
P vs NP problem, Poincare Conjecture(solved in 2003 by Perelman), Twin Prime Conjecture worth our attention as well…. 


Happy Practicing!



Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Social media & sharing icons powered by UltimatelySocial
%d bloggers like this: