Can someone confirm whether this is true :
$((a^b \ mod\ n) * (a^c \ mod \ n)) \mod \ n = a^{b+c} \ mod \ n$
Im pretty sure it is, and every combination of numbers i try manually works, but when i try to write a program that tests this for combinations from 1 to 25 for a,b,c,n i get different results and im not sure whether this is to problems with the modulus operation, maybe overflows happening
I cant find any rules for this specifically since the equation is so long