Learning Modular Exponentiation with Transformers