Find the smallest positive integer n such that 617n= 943n (mod 18)
a=1; b=1;c= 617*a%18; d=943*b%18; if(c==d, goto5, goto6);printc, d, a, b; a++;if(a<100, goto2, 0);a=1;b++;if(b<100, goto2, discard=0;
The smallest positive integer n = 9
\(617n=943n \pmod{18}\\ -326n = 0 \pmod{18}\\ -326n + 342n = 0 \pmod{18}\\ 16n = 0 \pmod{18}\\ \text{now we look for the least common multiple of 16 and 18}\\ LCM(16,18)=144 = 16\cdot 9\\ n=9\)