Help:=proc(): print(`L(n), theta(x) , psi(x) , T(x)`): print(`TestT1a(x), TestT1(x), TestT2a(x), TestT2(x)`): print(`Check49a(x), Check49(x)`): end: with(numtheory): #L(n)=log(p) if n is a p^k for some k, 0 otherwise L:=proc(n) local a: if n=1 then RETURN(0): fi: a:=ifactors(n)[2]: if nops(a)>1 then RETURN(0): else RETURN(log(a[1][1])): fi: end: #theta(x)=Sum(log(p),p<=x): theta:=proc(x) local p,a,s: a:=2: s:=log(2): while nextprime(a)<=x do a:=nextprime(a): s:=s+log(a): od: s: end: #psi(x): Sum(L(n),n=1..x): psi:=proc(x) local n: add(L(n),n=2..trunc(x)): end: #T(x)=Sum(log(i),i=1..trunc(x)); T:=proc(x) local i: add(log(i),i=1..trunc(x)): end: #T(x)=Sum(psi(x/i),i=1..x) #psi(x)=Sum(mobius(k)*T(x/k),k=1..x); #TestT1a(x): tests that T(x)=Sum(psi(x/i),i=1..x) TestT1a:=proc(x) local i: simplify(T(x)-add(psi(x/i),i=1..x)): end: #TestT1(x): tests that T(y)=Sum(psi(y/i),i=1..y), for #y<=x TestT1:=proc(x) local i: evalb({seq(TestT1a(i),i=1..x)}={0}): end: #TestT2a(x): tests that #psi(x)=Sum(mobius(k)*T(x/k),k=1..x); TestT2a:=proc(x) local i: simplify(psi(x)-add(mobius(i)*T(x/i),i=1..trunc(x))): end: #TestT2(x): tests that #psi(x)=Sum(mobius(k)*T(x/k),k=1..x); #y<=x TestT2:=proc(x) local i: evalb({seq(TestT2a(i),i=1..x)}={0}): end: #The difference between the left and right sides #of (4.9) in Levinson's article with #F=psi and G=T fo a specific x Check49a:=proc(x) local k,n: simplify(psi(x)*log(x)+add(psi(x/n)*L(n),n=1..x)- add(mobius(k)*log(x/k)*T(x/k),k=1..x)): end: Check49:=proc(x) local y: evalb({seq(Check49a(y),y=1..x)}={0}): end: