some notes on modular arithmetic and modular exponentiation (last digit problem)