News for hackers. Stuff that matters.
Re:Is this prime? by iopq on Tuesday March 08, 2016 @11:17AM (#11246165)
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.

Re:Is this prime? by madcaptenor on Tuesday March 08, 2016 @11:40AM (#11246368)
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.
Re:Is this prime? by sdenton4 on Tuesday March 08, 2016 @11:50AM (#11246462)
The more general test for eleven is to check that the alternating sum of the digits is zero.
Re:Is this prime? by cousin_it on Tuesday March 08, 2016 @01:48PM (#11247477)
Counterexample: 209. The even more general test is that the alternating sum of digits is divisible by 11.
Re:Is this prime? by sdenton4 on Tuesday March 08, 2016 @11:54PM (#11251016)
(I'll pretend to defend myself and say I meant zero mod eleven. :) )
Re:Is this prime? by Bahamut on Tuesday March 08, 2016 @11:41AM (#11246371)
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
Re:Is this prime? by EpicDavi on Tuesday March 08, 2016 @12:13PM (#11246640)
Neat trick! Just used it to find out that this post id is divisible by 7.
Re:Is this prime? by miracle_code on Tuesday March 08, 2016 @11:23AM (#11246211)
143 and 169 come to mind as well. Got 65 as highest score btw, was always a good calculator.
Re:Is this prime? by sebastos on Tuesday March 08, 2016 @01:35PM (#11247365)
Well, I feel better for going out on 91 now after only 5 numbers.