<s>[INST] Solve $ord_x(2) = 20$ Given that the (multiplicative) order of $2$ mod $x$ is $20$, how can I work out what $x$ is?
 [/INST] Method 1:-
From Euler Totient Function(or theorem) we know-

$$a^{\phi(n)}\equiv1\pmod n$$ for $\gcd(a,n)=1$

Here you have,$2^{20}\equiv1\pmod n$.
Comparing the two equations we have,$\phi(n)=20$.Try to find $n$ from it.
Method 2:-
We know that for all $n$,$(a-b)|(a^n-b^n)$ and $a^n-b^n$ is also divisible by $a+b$ if $n$ is odd.
So,We need to find $x$ such that $x|2^{20}-1$
Note that $2^{20}-1$ can be written as $2^{20}-1^{20}$.
This can be written in the following forms-

$(2^5)^4-(1^5)^4$   Hence,$n=2^5-1$ is a factor.
$(2^{10})^2-(1^{10})^2$  Hence,$n=2^{10}-1$ is a factor.
$(2^4)^5-(1^4)^5$ Hence,both $2^4-1$ and $2^4+1$ are factors.

Important note-Factors of the values of $n$ given are also factors of the number.
</s>