MA-581K/CSC-691K Homework 1 (due September 3 at 5pm)
Please design a better cycle_indices function, i.e., one
that uses fewer applications of the function next. Use the fact that
for l(x) = 2y with 2y <= x < 2y+1
there exists an n such that xn = xl(n)-1.
Write a Maple procedure that implements your algorithm and
uses it to factor some numbers, such as ithprime(1000)*ithprime(1001).
Compare the number of applications of next of your new
cycle_indices procedure with the one presented in class
by counting and returning this number as well. You should
also modify my procedure so that it returns the number of next
calls for comparison.
Please submit by email to kaltofen@eos.ncsu.edu 2 files: your Maple source code and an ASCII version
of your session in Maple testing and comparing your function with
the one I wrote. You can save an ASCII version of your session
by exporting it as text with the File menu.