Question: I want to use Sage code to slove. 14. Write a program in Sage which inputs integers a and n with n >1 and god(a,

 I want to use Sage code to slove. 14. Write aprogram in Sage which inputs integers a and n with n >1

I want to use Sage code to slove.

14. Write a program in Sage which inputs integers a and n with n >1 and god(a, nl) =1, and outputs the order of a modulo ni, according to the following simple algorithm: successively test a', a?,q*, ... until the first k occurs for which a = 1 (mod n), and report that the number k is the order of a modulo n. Test your program by finding the order of 17 modulo 100 and the order of 10001 modulo 11111. 15. For each of the primes p = 101, 103, 107, use your Sage program from problem 14 to find the smallest positive primitive root modulo p. 14. Write a program in Sage which inputs integers a and n with n >1 and god(a, nl) =1, and outputs the order of a modulo ni, according to the following simple algorithm: successively test a', a?,q*, ... until the first k occurs for which a = 1 (mod n), and report that the number k is the order of a modulo n. Test your program by finding the order of 17 modulo 100 and the order of 10001 modulo 11111. 15. For each of the primes p = 101, 103, 107, use your Sage program from problem 14 to find the smallest positive primitive root modulo p

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!