radclyffe59 wrote:
Does anyone here play any sorts of number games in their head... just at any time, anywhere. For example, whenever I see a number that has more than 1 digit in it (a number plate or a price or anything at all), I have to "add" up the digits in the number until I can bring them down to 1 digit again - like this -
Say the number I see is 87452
In my head I go 8+7+4+5+2=26
Then 2+6=8
Except I do it quicker.
I don't mean to make it look like I'm bragging about anything, I just wondered if anyone did that sort of thing, and whether they've noticed number patterns by doing it - thereby enabling them to work it out quicker.
ie you can ignore 9 and anything that adds up to 9 - so I can ignore the 7 and the 2, and the 5 and the 4, and know that the answer is 8 straight away.
I know it's completely useless, and probably quite obvious too, but it's just what I do...
You're actually calculating 87452 modulo 9, which is what the remainder of 87452 is when divided by 9. This is because
87452 = 8(10^4) + 7(10^3) + 4(10^2) + 5(10) + 2
10 = 1 mod 9 (because 10 = 9 + 1 so 1 is the remainder of 10 when it's divided by 9), so any power of 10 is congruent to 1 modulo 9, so
87542 = 8 + 7 + 4 + 5 + 2 = 26 mod 9
Apply again to get 26 = 8 mod 9 so 87452 = 8 mod 9.
This is also why you can ignore any multiple of 9; 9 = 0 mod 9.
If you like doing stuff with numbers number theory is a fun topic. (and by the way, I don't think modular arithmetic is at all useless...)
tallyman wrote:
Isn't there a similar trick to know if a number is divisible by 11? I've forgotten.
It isn't quite as simple for 11. Take the case of 87452 = 8(10^4) + 7(10^3) + 4(10^2) + 5(10) + 2
10 = -1 mod 11, so substitute that in to get
8(10^4) + 7(10^3) + 4(10^2) + 5(10) + 2 = 8 - 7 + 4 - 5 + 2 = 2 mod 11
Hence 87452 is not divisible by 11 (for n to be divisible by 11, it would have to be the case that n = 0 mod 11)
Take instead the case of 2310 = 0 - 1 + 3 - 2 = 0 mod 11, so we can tell that 2310 is divisible by 11.
That is, starting from the rightmost digit, alternate adding and subtracting each digit, and if the end result is divisible by 11, then the whole number is.
Divisibility checks that work for other numbers work on similar principles. There's actually one that works for 7, 11, and 13 that involves alternating adding an subtracting 3 digits at a time rather than just 1.
_________________
* here for the nachos.