the order of a number "a" is the least number such a^r = 1 mod (certain number)Find the order of 7 modulo 172.

but in Euler's theorem they did not say if (a,n)=1 but it is the not the least number

Example

but

second question your proof is not correct since how do you know that

maybe n=5

but you can prove it like this

you have two cases for every case for 3

if 3 divide n it is clear that n^101-n is divisible by 3

if not (n,3)=1

multiply with 3

for 11 same