Mathematics
The 13 Trick: Unlocking Divisibility Secrets
Quick fact
The divisibility rule for 13 works because multiplying the last digit by 4 and adding it to the rest of the number is equivalent to checking the original number modulo 13, due to the fact that 10 is congruent to -3 modulo 13, and 4 is the modular inverse of 10.
Why this is interesting
You can test if a number is divisible by 13 with a simple trick—but why does it work, and what hidden patterns make such shortcuts reliable?
Read the full explanation
Understanding The 13 Trick: Unlocking Divisibility Secrets
To test if a number like 273 is divisible by 13, you can use this trick: take the last digit (3), multiply it by 4 to get 12, and add that to the remaining part (27) to get 39. Since 39 is divisible by 13, so is 273. But why multiply by 4? The key is modular arithmetic, which is like clock arithmetic where numbers wrap around after reaching a certain value (the modulus). Here, we work modulo 13. Any number can be written as 10 times the 'rest' plus the last digit. For example, 273 = 27×10 + 3. In modulo 13, 10 is congruent to -3 (because 10 + 3 = 13, which is 0 mod 13). So 273 ≡ 27×(-3) + 3 = -81 + 3 = -78 ≡ 0 mod 13, meaning it's divisible. The trick replaces multiplying by 10 with multiplying by -3, but to avoid negative numbers, we use the fact that -3 ≡ 10 ≡ ? Actually, the trick uses 4 because 10×4 = 40 ≡ 1 mod 13 (since 40 - 39 = 1). So 4 is the modular inverse of 10. Multiplying the last digit by 4 and adding to the rest effectively multiplies the original number by 4, which doesn't change divisibility by 13 (since 4 and 13 are coprime). This transforms the number into a smaller one while preserving the remainder modulo 13.
A deeper explanation
The divisibility rule for 13 is a direct application of modular arithmetic. Let the number be N = 10a + b, where b is the last digit and a is the rest. We want to test if N ≡ 0 (mod 13). Since 10 ≡ -3 (mod 13), we have N ≡ -3a + b (mod 13). This is not the usual trick. The common trick uses 4: N' = a + 4b. Why does this work? Because 10 has a multiplicative inverse modulo 13. The inverse of 10 mod 13 is a number x such that 10x ≡ 1 (mod 13). Since 10×4 = 40 ≡ 1 (mod 13), 4 is that inverse. Now, if we multiply N by 4, we get 4N = 40a + 4b ≡ a + 4b (mod 13) because 40 ≡ 1. Thus, N ≡ 0 (mod 13) if and only if a + 4b ≡ 0 (mod 13). This works because 4 and 13 are coprime, so multiplying by 4 is an invertible operation modulo 13; it doesn't introduce or remove factors of 13. The process can be repeated on the new number until it's small enough to check directly. More generally, for any divisor d coprime to 10, we can find the modular inverse of 10 modulo d, say k, and then the rule is: N is divisible by d iff a + k·b is divisible by d. For d=7, the inverse of 10 mod 7 is 5 (since 10×5=50≡1 mod 7), giving the rule: double the last digit and subtract (or add 5 times). For d=13, the inverse is 4. This reveals that divisibility rules are not arbitrary tricks but consequences of the algebraic structure of integers modulo d. The reliability of such shortcuts stems from the fact that they are equivalent transformations that preserve divisibility. The method also highlights the importance of modular inverses, which are central in number theory and cryptography.