Dec 12, 2010

Totient function and its identity

Maxima 5.22.1 http://maxima.sourceforge.net
using Lisp CMU Common Lisp Snapshot 2010-05 (20A Unicode)
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) n=dsum(totient(d),d,n);

1[10]
(%i2) listify(divisors(24));

2[11]
(%i3) map(totient, %);

3[10]
(%i4) apply("+", %);

4[10]
(%i5) pair2frac(x):=first(x)/second(x);

5[10]
(%i6) orderbydenom(x,y):=orderlessp(denom(x),denom(y));

6[10]
(%i7) create_list([k,n],k,1,n),n=10;

7[10]
(%i8) map(pair2frac,%);

8[10]
(%i9) sort(%,orderbydenom);

9[10]
(%i10) create_list([k,n],k,1,n),n=24;

10[10]
(%i11) map(pair2frac,%);

11[10]
(%i12) sort(%,orderbydenom);

12[10]
(%i13)


May 23, 2010

Generating function of Mangoldt function

From the Mangoldt function definition with dsum(), it is easy to obtain the generating function of Mangoldt function.

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)$

The following file contains the definition of dsum().
(%i1) load("elementaryNumberTheory.mac");


(%i2) mangoldt(N):=if integerp(N)
then apply(dsum,[moebius(N/d)*log(d),d,N])
else dsum(moebius(N/d)*log(d),d,N)$

(%i3) texput(nounify(mangoldt), "\\Lambda")$
 
The definition of Mangoldt function is given above.
(%i4) 'mangoldt(n)=mangoldt(n);

 

We can see that the definition works fine.
(%i5) 'mangoldt(27)=mangoldt(27);


(%i6) 'mangoldt(27)=radcan(mangoldt(27));


(%i7) 'mangoldt(28)=mangoldt(28);


(%i8) 'mangoldt(28)=radcan(mangoldt(28));


 
The following holds for any number-theoretic functions:
(%i9) dprod;

 

Having a(n) being Moebius function and b(n) being logarithmic function, the following holds:
(%i10) dprod,a(n):=moebius(n),b(n):=log(n);


 
Since (%o11) and (%o12) holds, and right hand side of (%o10) is already the generating function of Mangoldt function, we obtain (%o13).
(%i11) 'diff(zeta(s),s)=sum(diff(1/n^s,s),n,1,inf);


(%i12) 1/zeta(s)=sum(moebius(n)/n^s,n,1,inf);


(%i13) -diff(zeta(s),s)/zeta(s)=sum('mangoldt(n)/n^s,n,1,inf);


(%i14)