Goldbach conjecture story

Math Day 6:

Goldbach's Conjecture in Python:

Because of Chen's story, a lot of people are particularly concerned about the Goldbach conjecture Goldbach Conjecture. The general public think this is the most difficult mathematical problem in the world.
In fact, the Goldbach conjecture particularly easy to understand, but no one can give proof.

Goldbach conjecture . Each even number greater than 2 can be expressed as the sum of two primes.

Examples:
4 = 2 + 2, 3 + 3 = 6, + 7 = 18 ... 11

Background story - civilians mathematician is also the spring:

In 1742, Christian Goldbach (Goldbach), a civilian mathematician to the then dean of mathematics Euler (= 2.73 is the most basic E) Leonhard Euler (E ^ i pi + 1 = 0) * Write a letter letter, he said he had a guess:

Within last 4 Number Greater the even Every CAN BE
written AS TWO The ODD SUM of Prime Numbers.
Each even greater than 4 may be used two odd prime and represents the number of

Wise man must be a sparse, Euler did not pay great attention to this letter, because he felt it was not obvious to you. However, the example is not proof of Goldbach guess 2019 was not proven.

in 2013, Zhang Yi Tang proves First Finite bound at The Least GAP ON the BETWEEN consecutive primes , which proved even more close to the mathematics Twin- Prime Conjecture , if Luan raw primes can permit it, perhaps Goldbach conjecture is not far.

[caption id="attachment_2394" align="alignnone" width="500"]
8699364-aa8cf354c9320558.jpg

aingnamma / Pixabay [/ caption]

I went to school, not the smartest that another wave of students. But I was smart enough to try not to think about certificates Goldbach conjecture, but idleness is not my style, so I think given use Python to test the Goldbach conjecture.

Goldbach Conjecture Python Trial:

GoldBach Conjecture 

import math
MAX=10000;

primes=[];

def sieveSundaram():
    marked=[False]*(int(MAX/2)+100);
    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):
            marked[j]=True;

    primes.append(2);

    for i in range(1, int(MAX/2)+1):
        if (marked[i]==False):
            primes.append(2*i+1);        

def findPrimes(n):
    if (n <=2 or n % 2 !=0):
       print("Even Number");
       return;

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

sieveSundaram();
findPrimes(4);
findPrimes(22);

#This code is contributed  by chandan_jnu

Output:

findPrimes(4);
2 + 2 = 4

findPrimes(22);
3 + 19 = 22

findPrimes(5000);
7 + 4993 = 5000

findPrimes(8800);
17 + 8783 = 8800

findPrimes(9998);
31 + 9967 = 9998

Personal Thoughts:

I have a bad habit, it is more optimistic about the television program. Every time there and mathematically related reality show, the host will say "too much, genius ..." or "Goldbach conjecture can answer out of it?." Science, especially in mathematics is never short genius, but the media always rendering them more than to see their efforts clever unknown. In those years I was in Buffalo, as long as I see, there are always ten p.m. Friday offices are lighted. Moreover, the mathematics is not only boring, it also has a lot of interesting questions. Like Fermat's Last Theorem (solved in 1993, Wiles). Riemann hypothesis , Navier-Stroke ,
P VS NP problem, Pang Kani conjecture (solved in 2003 by Perelman), the twin prime conjecture . . . .

Happy Practicing!

Reference:

https://web.stanford.edu/class/cs97si/probs/2262.htm

https://en.wikipedia.org/wiki/Yitang_Zhang

https://www.geeksforgeeks.org/program-for-goldbachs-conjecture-two-primes-with-given-sum/

Reproduced in: https: //www.jianshu.com/p/3b39024b60ab

Guess you like

Origin blog.csdn.net/weixin_34242658/article/details/91073046