#Okay to post #Yonah Biers-Ariel, Feb 11th, Assignment 6 with(numtheory): #1. CheckZ5(N) approximates the integral in (V) in Zagier's paper. CheckZ5:=proc(N) local i: add(evalf((th(i)-i)/i^2),i=1..N): end: #3. gT(f,t,z,T) finds the integral of f(t)*exp(-z*t) for t from 0 to T gT:=proc(f,t, z,T): evalf(Int(f*exp(-z*t),t=0..T)): end: #Z(s,N) Z:=proc(s,N) local n: add(1/n^s,n=1..N): end: #Ph(s,N): sum(log(p)/p^s, first N primes) Ph:=proc(s,N) local i: add( log(ithprime(i))/ithprime(i)^s,i=1..N): end: #th(x): sum(log(p), p<=x) th:=proc(x) local i,su: su:=0: for i from 1 while ithprime(i)<=x do su:=su+ log(ithprime(i)): od: su: end: #EP(s,N): the product of 1/(1-1/p^s)) over the first N primes EP:=proc(s,N) local i: expand(mul(1/(1-1/ithprime(i)^(s)),i=1..N)): end: