I was wandering if there is any possible efficient way of finding the Remainder when 2^n is divided by m where n and m are random integers. Is there any equation where I sub n and m into to give me the remainder or do we have to follow recursive methods? Do note that I am a beginner and I'm just starting out so might not understand stuff that is too complicated.
Thanks in advance.