4 ms·
Additionally 9 * n = [n-1, 10-n] for n = 2-11; where n-1 is the digit in the 10's place and 10-n in the single place. This just an aesthetic curiosity. I know t
by somethingroma 8y ago
Additionally 9 * n = [n-1, 10-n] for n = 2-11; where n-1 is the digit in the 10's place and 10-n in the single place. This just an aesthetic curiosity. I know the pattern continues for larger n I've just never bothered to generalize it. Also never compared it to other bases.
- Koshkin 8y ago> [n-1, 10-n] for n = 2-11 I think the usual 10 * n - n makes more sense and is much easier to remember.
- sdenton4 8y agoIt's not an aesthetic curiosity at all! 10 is equal to 1 mod 9... So suppose X is written in base 10 (a0 * 10^0 + a1 * 10^1 + a2 * 10^3 +...) and you want to find X mod 9. Then all of the 10^k's are just 1 (mod 9), so you just get the sum of the digits. So if X is divisible by 9, then the sum of the digits (mod 9) is zero. Same works for 3 (x is div by 3 iff the sum of the digits id divisible by 3). And 11 gets an /alternating/ sum of the digits, since 10 is -1 mod 11...