Tag
Modular arithmetic
- What Can Be the Last Digit of a Fourth Power?The last digit of a natural number raised to the fourth power can only be 0, 1, 5, or 6. Here is a short proof and examples.
- Why Is Every Cube 0, 1, or 8 Modulo 9?Write n as 3q, 3q + 1, or 3q + 2, then expand its cube to show it is congruent to 0, 1, or 8 modulo 9.
- What Is Modulo Reduction, and How Do You Use It?Modulo reduction replaces an integer with an equivalent remainder and simplifies sums, products, and powers while preserving congruences, not ordinary equality.
- Why Can a Perfect Square End Only in 0, 1, 4, 5, 6, or 9?A perfect square in base 10 can end only in 0, 1, 4, 5, 6, or 9; check square residues modulo 10 and see why the converse fails.
- How to Find a Quadratic Nonresidue Modulo a Prime pTest candidates a using Euler's criterion: if a^(p−1)/2 is −1 modulo p, then a is a quadratic nonresidue.
- How to Compute the Modular Inverse in Elliptic-Curve AdditionFor elliptic-curve addition over a prime field, invert the coordinate difference modulo p with the extended Euclidean algorithm—not ordinary division.
- What Is the Divisibility-by-7 Rule, and Why Does It Work?Test divisibility by 7 by subtracting twice the last digit from the remaining number; congruence arithmetic explains why the rule works.