Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I always get tripped up on multiples of 13. I wonder why that is.


There is no easy way to tell multiples of 13. 91 is particularly hard because it's a multiple of 7 and 13.

Obviously 5 * 13 is too easy. There's a test for division by 3, so 9 * 13 is too easy.

So basically you should only miss 91.


I've heard 91 called the "smallest non-obvious composite". Assume that testing for divisiblity by 2, 3, 5, and 11 is easy - for 2 and 5 you just look at the last digit, for 3 you take the sum of the digits, and with two-digit numbers a number is divisible by 11 if and only if both its digits are the same. Also assume that you can recognize squares. Then 91 = 7*13 is the first number that you won't recognize as composite using these test.


The more general test for eleven is to check that the alternating sum of the digits is zero.


Counterexample: 209. The even more general test is that the alternating sum of digits is divisible by 11.


(I'll pretend to defend myself and say I meant zero mod eleven. :) )


There is a rule for divisibility by 7 - take the last digit, double it, and subtract from the rest of the numbers. If that is divisible by 7, the original number is too. For example, 91 gives 9 - 2 * 1 = 7, so it is divisible by 7


Neat trick! Just used it to find out that this post id is divisible by 7.


143 and 169 come to mind as well. Got 65 as highest score btw, was always a good calculator.


Well, I feel better for going out on 91 now after only 5 numbers.


For me it's 17, 17*3= 51 which at a first quick glance looks like a prime, up until you add the digits and it's clear of course.


Use the test for divisibility by 3: if the sum of the digits is divisible by 3, the number is divisible by 3. 5+1=6, so 51 is divisible by 3.


Oh yeah, that's what I meant by saying "up until you add the digits and it's clear of course.". It's just an instant observation I guess.


That's one where experience playing darts really helps. :-)


Where I'm from, 17 and 51 are two freeways that run kinda parallel to each other, so that was an easy one for me.


At school we did exercises to memorize from 1x1 up to 12x12, so even now I can remember all of them (and powers of two, of course :-))




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: