2021.11.12 MATH 3600 Twin Prime Goldbach

197 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) 
       
 
       
N=10000000 P=[] for i in srange(3,N): if is_prime(i): P.append(i) len(P) 
       
664578
664578
prime_diff_dict={} for i in srange(1,len(P)): diff = P[i]-P[i-1] if prime_diff_dict.has_key(diff): prime_diff_dict[diff]+=1 else: prime_diff_dict.update({diff:1}) 
       
len(prime_diff_dict) 
       
74
74
list_plot(prime_diff_dict) 
       
list_plot([[2*i,prime_diff_dict[2*i]] for i in srange(1,20)]) 
       
HL(2) 
       
1
1
list_plot([[2*i,prime_diff_dict[2*i]/HL(2*i)] for i in srange(1,20)]) 
       

It appears to be the case that if we divide the number of occurences of 2*i as a consecutive difference by HL(2*i), then we smooth out the curve immensely!

Can we heuristically explain why 6 appears more often as a consecutive difference than 2 or 4?

twin_prime_cores=[] for i in srange(2,len(P)): if P[i]-P[i-1]==2: twin_prime_cores.append((P[i]-1)/6) 
       
len(twin_prime_cores) 
       
58980
58980
twin_prime_cores[:100] 
       
[1,
 2,
 3,
 5,
 7,
 10,
 12,
 17,
 18,
 23,
 25,
 30,
 32,
 33,
 38,
 40,
 45,
 47,
 52,
 58,
 70,
 72,
 77,
 87,
 95,
 100,
 103,
 107,
 110,
 135,
 137,
 138,
 143,
 147,
 170,
 172,
 175,
 177,
 182,
 192,
 205,
 213,
 215,
 217,
 220,
 238,
 242,
 247,
 248,
 268,
 270,
 278,
 283,
 287,
 298,
 312,
 313,
 322,
 325,
 333,
 338,
 347,
 348,
 352,
 355,
 357,
 373,
 378,
 385,
 390,
 397,
 425,
 432,
 443,
 448,
 452,
 455,
 465,
 467,
 495,
 500,
 520,
 528,
 542,
 543,
 550,
 555,
 560,
 562,
 565,
 577,
 578,
 588,
 590,
 593,
 597,
 612,
 628,
 637,
 642]
[1,
 2,
 3,
 5,
 7,
 10,
 12,
 17,
 18,
 23,
 25,
 30,
 32,
 33,
 38,
 40,
 45,
 47,
 52,
 58,
 70,
 72,
 77,
 87,
 95,
 100,
 103,
 107,
 110,
 135,
 137,
 138,
 143,
 147,
 170,
 172,
 175,
 177,
 182,
 192,
 205,
 213,
 215,
 217,
 220,
 238,
 242,
 247,
 248,
 268,
 270,
 278,
 283,
 287,
 298,
 312,
 313,
 322,
 325,
 333,
 338,
 347,
 348,
 352,
 355,
 357,
 373,
 378,
 385,
 390,
 397,
 425,
 432,
 443,
 448,
 452,
 455,
 465,
 467,
 495,
 500,
 520,
 528,
 542,
 543,
 550,
 555,
 560,
 562,
 565,
 577,
 578,
 588,
 590,
 593,
 597,
 612,
 628,
 637,
 642]

Questions regarding twin-prime cores: 

Is there an $n_0$ so that every $n>n_0$ is a sum of twin-prime cores?

How does the number of representations grow?

Are there striations present? 

Can we come up with a correction factor which helps to explain the striations, akin to HL(n) for Goldbach?