Not sure what you are asking for.

I think you are asking for the index (or order) of 3 modulo 31?

Or are you asking for the order (or index) of 3^20=3486784401 modulo 31?

Consider the ring Z_{200}.find all units in Z/200Z

What are its units?

Answer, those are the numbers such that gcd(n,200)=1.

Meaning the numbers relatively prime to it.