Question: find the order of generator g in multiplicative group mod p

Attached file is the maple code I have been working on and I am currently struggling to do the last bit ( which is a generalisation of the previous part). Please tell me what's wrong with my code. Thanks!

QuestionLab2.mw

Please Wait...