Mantoldt function
This article defines the Mangoldt function. The file of this session can be found 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)$
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)$
The following file defines the function dsum(). You can find the definition of dsum() in the previous article.
(%i1) load("elementaryNumberTheory.mac");
(%i2) matchdeclare([a,b],true)$
(%i3) defrule(logexpon, a*log(b), log(b))$
The above rule logexpon defines a pattern matching and transformation function that appears in the standard definition of the Mangoldt function, which is as follows:
(%i4) mangoldt1(N):= if integerp(N)
then block([exp], if (exp:logexpon(radcan(log(N)))) = false then 0 else exp)
else apply(nounify(mangoldt1), [N])$
The above defines that if N is power of a prime, then the log of the prime is returned, else 0 is returned.
(%i5) mangoldt(N):=if integerp(N)
then apply(dsum,[moebius(N/d)*log(d),d,N])
else dsum(moebius(N/d)*log(d),d,N)$
The above defines that mangoldt function of N is defined to be sum of convolution multiplication of moebius() and log() over the divisors of N.
(%i6) texput(nounify(mangoldt), "\\Lambda")$
(%i7) a:radcan(log(11^3));
(%i8) logexpon(a);
(%i9) 'mangoldt1(11^3)=mangoldt1(11^3);
(%i5) mangoldt(N):=if integerp(N)
then apply(dsum,[moebius(N/d)*log(d),d,N])
else dsum(moebius(N/d)*log(d),d,N)$
The above defines that mangoldt function of N is defined to be sum of convolution multiplication of moebius() and log() over the divisors of N.
(%i6) texput(nounify(mangoldt), "\\Lambda")$
(%i7) a:radcan(log(11^3));
(%i8) logexpon(a);
(%i9) 'mangoldt1(11^3)=mangoldt1(11^3);
The above shows that the mangoldt1() works fine if the number is power of a prime.
(%i10) a:radcan(log(2^2*3^3));
(%i11) logexpon(a);
(%i12) 'mangoldt1(2^2*3^3)=mangoldt1(2^2*3^3);
The above shows that mangoldt1() works fine for numbers other than the power of prime.
The following session shows that the definition based on dsum() function works equally.
(%i13) a:11^3;
(%i14) 'mangoldt(a)=mangoldt(a);
(%i15) radcan(%);
(%i16) a:2^2*3^3;
(%i17) 'mangoldt(a)=mangoldt(a);
(%i18) radcan(%);
(%i19)
(%i14) 'mangoldt(a)=mangoldt(a);
(%i15) radcan(%);
(%i16) a:2^2*3^3;
(%i17) 'mangoldt(a)=mangoldt(a);
(%i18) radcan(%);
(%i19)
No comments:
Post a Comment