Help := proc() print(`LamJ(n),CheckFA(N),PsiJ(x),TJ(x),Check210(N)`); end: with(numtheory): #=========================================== #von Mangoldt function = log(p) if n=p^k #and zero otherwise. LamJ := proc(n) local fac; fac := ifactors(n)[2]; if nops(fac)=1 then RETURN(log(fac[1][1])); else RETURN(0); fi; end: #=========================================== #CheckFA(N): empirically checks the fundamental #theorem of arithmetic for the first N integers #in the equivalent version #log(n)=sum(LamJ(i),i|n) CheckFA := proc(N) local n; for n from 1 to N do if simplify(log(n)-add(LamJ(i),i in divisors(n))) <> 0 then print(`Bad news! For `, n, ` the Fundamental`); print(`Theorem of Algebra fails.`); fi; od; print(`Good news! At least up to `,N,` the Fundamental`); print(`Theorem of Algebra is true`); end: #=========================================== #PsiJ(x): the psi(x) function (sum of log(p) over all #prime powers <=x) PsiJ := proc(x) local j; add(LamJ(j),j=1..trunc(x)); end: #=========================================== #TJ(x): the sum of log(n) for n<=x TJ := proc(x) local n; RETURN(add(log(n),n=1..trunc(x))); end: #=========================================== #Check210(N):Checks equation 2.10 in the paper #about the prime number theorem for the class Check210 := proc(N) local x,n; for x from 1 to N do if simplify(TJ(x)-add(PsiJ(x/n),n=1..x)) <>0 then print(`Bad news! The line 2.10 in the paper`); print(`fails for`,n); fi; od; print(`Good news! The line 2.10 in the paper is true at least up to `, N); end: #===========================================