Let n be a positive integer and let k be the number of positive integers less than 2n that are invertible modulo 2n. If 2n=3 (mod 13), then what is the remainder when k is divided by 13?
Turns out the answer is 8.
2^n mod 13 ==3
n ==4 and k==15
15 mod 13 == 2