2021.11.10 MATH 3600 Goldbach

199 days ago by calkin

N=100000 P=[] for i in srange(3,N): if is_prime(i): P.append(i) len(P) 
       
9591
9591
r=[0 for i in srange(2*N)] for p in P: for q in P: r[p+q]+=1 
       
list_plot(r) 
       
list_plot(r[:N]) 
       
print(r[:100]) 
       
[0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 3, 0, 2, 0, 3, 0, 4, 0, 4, 0, 4, 0, 5, 0,
6, 0, 5, 0, 4, 0, 6, 0, 4, 0, 7, 0, 8, 0, 3, 0, 6, 0, 8, 0, 6, 0, 7, 0,
10, 0, 8, 0, 6, 0, 10, 0, 6, 0, 7, 0, 12, 0, 5, 0, 10, 0, 12, 0, 4, 0,
10, 0, 12, 0, 9, 0, 10, 0, 14, 0, 8, 0, 9, 0, 16, 0, 9, 0, 8, 0, 18, 0,
8, 0, 9, 0, 14, 0, 6, 0]
[0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 3, 0, 2, 0, 3, 0, 4, 0, 4, 0, 4, 0, 5, 0, 6, 0, 5, 0, 4, 0, 6, 0, 4, 0, 7, 0, 8, 0, 3, 0, 6, 0, 8, 0, 6, 0, 7, 0, 10, 0, 8, 0, 6, 0, 10, 0, 6, 0, 7, 0, 12, 0, 5, 0, 10, 0, 12, 0, 4, 0, 10, 0, 12, 0, 9, 0, 10, 0, 14, 0, 8, 0, 9, 0, 16, 0, 9, 0, 8, 0, 18, 0, 8, 0, 9, 0, 14, 0, 6, 0]
rbetter=[] for i in srange(N): if r[i]>0: rbetter.append([i,r[i]]) 
       
list_plot(rbetter) 
       
print(rbetter[:50]) 
       
[[6, 1], [8, 2], [10, 3], [12, 2], [14, 3], [16, 4], [18, 4], [20, 4],
[22, 5], [24, 6], [26, 5], [28, 4], [30, 6], [32, 4], [34, 7], [36, 8],
[38, 3], [40, 6], [42, 8], [44, 6], [46, 7], [48, 10], [50, 8], [52, 6],
[54, 10], [56, 6], [58, 7], [60, 12], [62, 5], [64, 10], [66, 12], [68,
4], [70, 10], [72, 12], [74, 9], [76, 10], [78, 14], [80, 8], [82, 9],
[84, 16], [86, 9], [88, 8], [90, 18], [92, 8], [94, 9], [96, 14], [98,
6], [100, 12], [102, 16], [104, 10]]
[[6, 1], [8, 2], [10, 3], [12, 2], [14, 3], [16, 4], [18, 4], [20, 4], [22, 5], [24, 6], [26, 5], [28, 4], [30, 6], [32, 4], [34, 7], [36, 8], [38, 3], [40, 6], [42, 8], [44, 6], [46, 7], [48, 10], [50, 8], [52, 6], [54, 10], [56, 6], [58, 7], [60, 12], [62, 5], [64, 10], [66, 12], [68, 4], [70, 10], [72, 12], [74, 9], [76, 10], [78, 14], [80, 8], [82, 9], [84, 16], [86, 9], [88, 8], [90, 18], [92, 8], [94, 9], [96, 14], [98, 6], [100, 12], [102, 16], [104, 10]]
list_plot(rbetter[:50]) 
       

Experimentally, it appears that numbers congruent to 0 mod 3 have more representations.

r0=[] r1=[] r2=[] for s in rbetter: if s[0]%3==0: r0.append(s) if s[0]%3==1: r1.append(s) if s[0]%3==2: r2.append(s) 
       
A=list_plot(r0,color='red') B=list_plot(r1,color='blue') C=list_plot(r2,color='darkgreen') 
       
show(A+B+C) 
       
show(A+C+B) 
       
 
       

We've established a heuristic to suggest that the number of representations of $n$ as a sum of two primes is inflated by a factor $HL(n)$ where

\[ HL(n) = \prod_{p|n} \frac{p-1}{p-2} \]

is a product over the odd primes dividing $n$.

n=30 
       
list(n.factor()) 
       
[(2, 1), (3, 1), (5, 1)]
[(2, 1), (3, 1), (5, 1)]
def HL(n): m=2*n factor_list=list(m.factor()) # this list of factors/powers *will* include 2, so we can know to ignore it! hl=1 for i in factor_list[1:]: p=i[0] hl=hl*(p-1)/(p-2) return(hl) 
       
hl_adjusted=[0] for i in rbetter: hl_adjusted.append([i[0],i[1]/HL(i[0])]) 
       
list_plot(hl_adjusted) 
       
A=list_plot(rbetter,color='red') B=list_plot(hl_adjusted,color='blue') 
       
show(A+B) 
       
 
       
C=plot(Li(x),x,2,10000000,color='red') D=plot(x/log(x),x,2,10000000) show(C+D) 
       
show(B) 
       
E=plot(2*x/(log(x))^2,x,2,N,color='red') 
       
show(B+E) 
       
 
       
integral(1/(x*log(x)),x) 
       
log(log(x))
log(log(x))
F=plot(2*4/5/log(x)*(x/log(x)-log(log(x))),x,5,N,color='red') 
       
show(B+F) 
       
G=plot(2*4/5*x/(log(x))^2,x,2,N,color='red') 
       
show(B+G)