News for hackers. Stuff that matters.
Re:Techniques for Factoring Numbers in Your Head by vorg on Thursday January 04, 2018 @04:50AM (#16069091)
> 2040 is, which is divisible by 7 iff 204 is

I don't follow that one.

To check whether 2747 is divisible by 7, I divide the multiple of 100 (i.e. 2700) by 50 (i.e. 54), add it to the remaining two digits, 47 (i.e. 101), then see if that's divisible by 7.

Re:Techniques for Factoring Numbers in Your Head by ohwaitnvm on Thursday January 04, 2018 @04:59AM (#16069129)
He reduced 2040 to 204 by dividing by 2 and 5 because he’s not interested in the factoring so much as just whether 7 is a factor.
Re:Techniques for Factoring Numbers in Your Head by CurtMonash on Thursday January 04, 2018 @05:30AM (#16069244)
Correct.

If I'm checking for any prime other than 2 or 5 -- each of which has it own quick-check anyway via the last digit only -- it's always OK to drop trailing zeros.