# 2022.11.16 MATH 3600-001 Random Goldbach model

## 317 days ago by calkin

N=300000 prime_list=[] p=3 while p<N: prime_list.append(p) p=next_prime(p)
goldbach_representations=[0 for i in srange(2*N)] for p in prime_list: for q in prime_list: goldbach_representations[p+q]+=1
goldbach_reps_pairs=[] for i in srange(len(goldbach_representations)/2): if goldbach_representations[i]>0: goldbach_reps_pairs.append([i,goldbach_representations[i]])
def hl(n): m=Integer(2*n) pd= m.prime_factors() hlf=1 for p in pd[1:]: hlf=hlf*(p-1)/(p-2) return(hlf)
gbc= [] #goldbach corrected by hl(n) for x in goldbach_reps_pairs: #print(type(x)) #a=x #print( hl(a) ) gbc.append([x,x/hl(x)])
var('t') A=list_plot(gbc) B=plot(1.7*t/(log(t))^2,t, 2,100000,color='yellow') C=plot(1.7*t/(log(t))^2-2*sqrt(2*t)/log(t),t, 2,100000,color='red') D=plot(1.7*t/(log(t))^2+2*sqrt(2*t)/log(t),t, 2,100000,color='green') show(A+B+C+D) What happens if we use Li(x) instead of x/log(x) to approximate $\pi(x)$?

def f(n): return(2*Li(n)*(Li(2*n)-Li(n))/n)
a=.75 A=list_plot(gbc) B=plot(a*f(t),t, 2,N,color='yellow') C=plot(a*f(t)-2*sqrt(2*t)/log(t),t, 2,N,color='red') D=plot(a*f(t)+2*sqrt(2*t)/log(t),t, 2,N,color='green') show(A+B+C+D) 