Modular Exponentiation

You can use modular exponentiation to calculate the remainder of a number raised to a power. The trick to finding large exponentials is to break them down into smaller ones. Example: Given that $M^2 ≡ 51 (mod 59)$, what is $M^{12} (mod 59)$? M^12 = M^(4+8) M^12 = M^4 * M^8 M^12 = (M^2)^2 * (M^2)^3✅ M^2 ≡ 51 (mod 59) M^4 ≡ (M^2)^2 ≡ (51)^2 (mod 59) M^4 ≡ 2601 (mod 59) M^4 ≡ 5 (mod 59)✅ M^4 ≡ 5 (mod 59) M^8 ≡ (M^4)^2 ≡ (5)^2 (mod 59) M^8 ≡ 25 (mod 59)✅ M^12 = M^4 * M^8 M^12 ≡ [(5 mod 59) * (25 mod 59)] M^12 ≡ 5*25 (mod 59) M^12 ≡ 125 (mod 59) M^12 ≡ 7 (mod 59)✅

November 29, 2023 · 1 min · 124 words · Xavier Loera Flores

Exponents Digits

Finding the ones digit of large exponents There is a trick to finding the ones place digit of a large exponentiated number. This trick involves finding the values of the small powers to find a pattern. Steps to finding the ones digit: Let A = n^x Find n^1, n^2, n^3, n^4,...,n^y Such that the values begin to repeat themselves in a pattern. Note: The ones digit of n^1 = the ones digit of n^y Use modulo arithmetic to find the remainder z z = x%y Ones digit of n^x = The ones digit n^z Example: Find Ones digit of 3^902 x = 902 3^1 = 3 | 3 3^2 = 9 | 9 3^3 = 27 | 7 3^4 = 81 | 1 Ones digit 3^4 = Ones digit 3^1 y = 4 z = 902 % 4 = 2 The ones digit of 3^902 = The ones digit 3^2 Ones digit = 9 Finding the first digits of large exponents There is a trick to finding the first few digits of a large exponentiated number....

November 28, 2023 · 2 min · 296 words · Xavier Loera Flores