Mar 3, 2010

Mobius function and its generating function

The pproduct() can be used to show that the Mobius function's generating function is 1/zeta(s).
This can be easily shown by expanding first few terms. The file mobius.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/imaxima-imath/imaxima.lisp")), linenum:0)$

(%i1) matchdeclare([a,b,c],true)$

(%i2) defrule(dsimp1,a/(b^s*c^s),a/(b*c)^s)$

(%i3) pproduct(e, var, pmax) ::=
if integerp(pmax)
then buildq([e:e,v:var,pm:pmax], block([res:1],for v:next_prime(1) while (v else apply(nounify(pproduct),[e,var,pmax])$

(%i4) texput(nounify(pproduct),
lambda([arglist], block([e,v,pm],[e,v,pm]:args(arglist),
if (pm=inf) then
concat("\\prod_{",tex1(v) ,":prime}",tex1(e))
else
concat("\\prod_{",tex1(v) ,":prime <",tex1(pm),"}",tex1(e)))))$

(%i5) texput(moebius, "\\mu");


(%i6) moe0:sum(moebius(n)/n^s,n,1,inf)=1/zeta(s);


(%i7) moe1:subst(15,inf,lhs(moe0));


(%i8) moe2:moe1,nouns;


(%i9) zeta(s)=pproduct(1/(1-1/p^s),p,inf);


(%i10) z1:1/zeta(s)=pproduct(1-1/p^s,p,inf);


(%i11) z2:subst(15,inf,rhs(z1));


(%i12) z3:z2,nouns;


(%i13) z4:expand(z3);


(%i14) z5:apply1(z4,dsimp1)$

(%i15) rest(z5,length(z5)-length(moe2));


(%i16)

 

No comments:

Post a Comment