The Goldbach Conjecture: Every even number greater than 2 is the sum of 2 primes in at least one way.
Let us create a list of odd primes.
|
|
|
Traceback (click to the left of this block for traceback) ... IndexError: list index out of range Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_6.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("cHJpbnQoZ29sZGJhY2hfcmVwcmVzZW50YXRpb25zWzEwMDAwMF0p"),globals())+"\\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in <module> File "/tmp/tmplXD5N3/___code___.py", line 3, in <module> exec compile(u'print(goldbach_representations[_sage_const_100000 ]) File "", line 1, in <module> IndexError: list index out of range |
How many representations do we get for even numbers?
Traceback (click to the left of this block for traceback) ... IndexError: list index out of range Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_7.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("cHJpbnQoZ29sZGJhY2hfcmVwcmVzZW50YXRpb25zWzc4OTY0XSk="),globals())+"\\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in <module> File "/tmp/tmpptkO4P/___code___.py", line 3, in <module> exec compile(u'print(goldbach_representations[_sage_const_78964 ]) File "", line 1, in <module> IndexError: list index out of range |
Traceback (click to the left of this block for traceback) ... IndexError: list index out of range Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_8.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("cHJpbnQoZ29sZGJhY2hfcmVwcmVzZW50YXRpb25zWzg1MDAwXSk="),globals())+"\\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in <module> File "/tmp/tmpbfBBPE/___code___.py", line 3, in <module> exec compile(u'print(goldbach_representations[_sage_const_85000 ]) File "", line 1, in <module> IndexError: list index out of range |
![]() |
![]() |
Idea: look at the champions: n for which r(n) is bigger than anything seen before.
|
![]() |
Let's find the champions in this list.
|
![]() |
52 52 |
[6, 8, 10, 16, 22, 24, 34, 36, 48, 60, 78, 84, 90, 114, 120, 168, 180, 210, 300, 330, 390, 420, 510, 630, 780, 840, 990, 1050, 1140, 1260, 1470, 1650, 1680, 1890, 2100, 2310, 2730, 3150, 3570, 3990, 4200, 4410, 4620, 5250, 5460, 6090, 6510, 6930, 7980, 8190, 9030, 9240] [6, 8, 10, 16, 22, 24, 34, 36, 48, 60, 78, 84, 90, 114, 120, 168, 180, 210, 300, 330, 390, 420, 510, 630, 780, 840, 990, 1050, 1140, 1260, 1470, 1650, 1680, 1890, 2100, 2310, 2730, 3150, 3570, 3990, 4200, 4410, 4620, 5250, 5460, 6090, 6510, 6930, 7980, 8190, 9030, 9240] |
2 * 3^2 * 5 2 * 3^2 * 5 |
2 * 3 * 19 2 * 3 * 19 |
2^3 * 3 * 5 2^3 * 3 * 5 |
2^3 * 3 * 7 2^3 * 3 * 7 |
It appears that champions have x coordinate divisible by 3, 5, 7, usually?
|
![]() |
It appears that whether x is 1 or 2 mod 3 makes little difference: however, being divisible by 3 makes a huge difference.
let's redo the plot with just 0 or not mod 3
|
![]() |
Let's redo this, but now, halve the value of the y co-ordinate when x is 0 mod 3.
|
![]() |
The last experiment was a little more complicated than we should do yet. Let's instead just focus on divisibility by 5.
|
![]() |
It looks as if 5/4 is too small a factor. Let's try 4/3.
|
![]() |
![]() |
It appears that divisibility by 5 increases the number of representations by 4/3.
Let's redo the plot with 3 and 5 corrected, with factors of 1, 2, 4/3, 8/3 respectively
![]() |
Let us define a correction factor, the Hardy Littlewood correction factor by
\[ hl(n) = \prod_{p|n} \frac{p-1}{p-2} \]
where $p$ ranges over the odd prime factors of n.
|
[2, 4999] [2, 4999] |
It appears that the method .prime_divisors() is what we want to use. Let's write the definition of hl(n) so that it would work even if n is odd (what we can do is compute it for 2*n, forcing the input to be even, and then always discard the 2).
|
6/5 6/5 |
8/3 8/3 |
|
2 2 |
Traceback (click to the left of this block for traceback) ... SyntaxError: invalid syntax Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_41.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("bS5wcmltZV9mYWN0b3JzKA=="),globals())+"\\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in <module> File "/tmp/tmpPTbJVR/___code___.py", line 3 ^ SyntaxError: invalid syntax |
<type 'sage.rings.integer.Integer'> <type 'sage.rings.integer.Integer'> |
|
t t |
|
![]() |
t t |
![]() |
![]() |
|