And this cycle repeats. So we know the least residues of (mod 13) for all is 3, 9, or 1.
Since implies , we have to find such that .
As it turns out, 2 is a primitive root modulo 13. So see for which such that .
See if you can figure it out from here.