# Solving a modular equation with a large modulus [duplicate]

This question already has an answer here:

I am having trouble solving this equation:

$17^n\equiv 1 \mod 640826899755722841329632946651705039010285107743541637238400825304943424424715705661705191669759$

for the smallest integer $n > 0$

I tried Wolfram|Alpha, but it did not help me. I realize that it would be easy to solve this equation if we knew the prime factors of the modulus. Could you help me to find a solution for this equation?

## marked as duplicate by J. M. will be back soon♦Nov 11 '17 at 9:51

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

• If we can completely factorize the modulus,then the problem will be solved. Does anyone know the factors of that modulus. Using wolframalpha I just found 2 prime factors of that modulus. – Joo Neruhu Nov 11 '17 at 10:34
• It is easy to solve this equation,all we need just the prime factors of the modulus. – Joo Neruhu Nov 11 '17 at 10:37

## 1 Answer

This is what MultiplicativeOrder[] should be used for. As my computer is a bit on the weak side, I'll use a smaller example:

MultiplicativeOrder[17, 640826899755722841]
476643402271080


Check:

PowerMod[17, %, 640826899755722841]
1