Hacker News new | ask | show | jobs
by ahn 5704 days ago
You can generate rules like these for arbitrary integers/primes(much easier than trying to remember them in my opinion). Take 41.

Example: 1476 is divisible by 41? 147 - 4 * 6 = 123. 12 - 4 * 3 = 0. Yes.

Example: 3321 is divisible by 41? 332 - 4 * 1 = 328. 32 - 4 * 8 = 0. Yes

What's the rule? Take the last digit off, multiply by 4 and subtract.

How to find the rules is left as an exercise.