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);
(%i2) listify(divisors(24));
(%i3) map(totient, %);
(%i4) apply("+", %);
(%i5) pair2frac(x):=first(x)/second(x);
(%i6) orderbydenom(x,y):=orderlessp(denom(x),denom(y));
(%i7) create_list([k,n],k,1,n),n=10;
(%i8) map(pair2frac,%);
(%i9) sort(%,orderbydenom);
(%i10) create_list([k,n],k,1,n),n=24;
(%i11) map(pair2frac,%);
(%i12) sort(%,orderbydenom);
(%i13)