I have to find a number x such that x is the smallest natural number that satisfies this equation:
$24x (\mod 59) = 2(\mod59)$.
Using Fermat's little theorem and Euler's primes function, given that 59 is a prime, I determined that
$24^{\phi 59} (\mod 59) =1 (\mod 59)$
$24^{58} (\mod 59) =1 (\mod 59)$
$2*24^{58} (\mod 59) =2 (\mod 59)$
$2* 24 * 24^{57} (\mod 59) =2 (\mod 59)$
$24 * (2 * 24^{57}) (\mod 59) =2 (\mod 59)$
Where $x = 2 * 24^{57}$.
Unfortunately I don't know if this x is the smallest one. How can I prove the fact in case it is correct?
Edit: Indeed, it is 5 not this huge value.
This is a problem in a chapter about Euler's theorem, thus I am pretty sure I can solve it merely using something related to it and modular arithmetic.