Square of zeta and number of divisors
The dirichlet series generating function of number of divisors of natural numbers is the square of zeta function. Precisely the following holds:
where %d(n) gives the number of divisors of n.
The following Maxima session calculates the left hand side and right hand side of the above for the first 49 terms and shows that they are equal.
zeta1.mac can be obtained from here.
Maxima 5.20.0 http://maxima.sourceforge.net
using Lisp CMU Common Lisp 19f (19F)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) block(load(("/Users/yasube/Programming/test-imaxima/cmucl/5.20.0/share/maxima/5.20.0/emacs/imaxima.lisp")), linenum:0)$
(%i1) batch("zeta1.mac");
batching /Users/yasube/Desktop/NumberTheory/zeta1.mac
(%i2) matchdeclare([a,b,c],true)
(%i3) defrule(dsimp1,a/(b^s*c^s),a/(b*c)^s)
(%i4) matchdeclare([a,b,c],true)
(%i5) defrule(dsimp2,a/b^(c*s),a/(b^c)^s)
(%i6) maxapplydepth:100
(%i7) matchdeclare([a,b,c],true)
(%i8) defrule(dsimp3,a^(b-s),[a,b])
(%i9) matchdeclare([a,b,c],true)
(%i10) defrule(dsimp4,a^s,a)
(%i11) dsimp5(x):=block([a:num(x),b:denom(x),c,d,e],[c,d]:dsimp3(a),
e:dsimp4(b),
if integerp(c) and integerp(d) and integerp(e) then c^d/(c*e)^s
else x)
The above %i2 to %i11 defines simplification functions that are needed to simplify the square of first 49 terms of the zeta function.
(%i12) d(n):=if integerp(n) then length(divisors(n)) else 'd(n)
(%i13) zeta(s)^2 = sum(d(n)/n^s,n,1,inf)
(%i14) maxapplydepth:100
(%i15) K:49
(%i16) a:sum(1/n^s,n,1,K)^2
The above is expanded and simplified from %i17 to %i19, then the first 49 terms are displayed in %i20. This is the calculation of the left hand side.
(%i17) b:expand(a)
(%i18) c:apply1(b,dsimp1,dsimp2)
(%i19) d:map(dsimp5,c)
(%i20) e:rest(d,length(d)-K)
Let's calculate the right hand side directly by using the definition of d(n) in %i12.
(%i21) sum(d(n)/n^s,n,1,K)
(%i22)
%o20 and %o21 are equal.
No comments:
Post a Comment