#Anthony Zaleski hw 6 #OK to post with(numtheory): Help:=proc() print(`CheckZ5(N),gT(f,t,z,T)`): end: ########## #Problem 1 ########## #CheckZ5(N): checks (V) in Zagier's paper CheckZ5:=proc(N) local x: evalf(add((th(x)-x)/x^2,x=2..N)): end: ########## #Problem 3 ########## #gT(f,t,z,T): inputs an expression f in a variable t, a complex number z, #and a real number T, and outputs the integral of f(t)*exp(-z*t) #for t from 0 to T. gT:=proc(f,t,z,T) int(f*exp(-z*t),t=0..T): end: ########C6.txt####### #C6.txt, Feb. 5, 2018, Experimental Mathematics Help:=proc(): print(`Z(s,N), Ph(s,N) , th(x) , EP(s,N), CheckZ4(N,alpha,eps),CheckZ5(N) `): end: with(numtheory): #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: #Checks IV in Zagier's paper CheckZ4:=proc(N,alpha,eps) evalf([eps*Ph(1+eps,N), eps*Ph(1+eps+I*alpha,N), eps*Ph(1+eps+I*2*alpha,N)]), evalf(add(binomial(4,2+r)*Ph(1+eps+I*r*alpha,N),r=-2..2)): end: