jambaugh said:
Oh! You want
practical!
Actually, not really. I just thought the lack of practicality was worth mentioning.
For example, one borderline-practical test for divisibility by 7 would be to add up a number by groups of 6:
111,222,333,444,555,666,777,888,999 is divisible by 7 iff 111+222333+444555+666777+888999 = 2222775 is, and 2,222,775 is divisible by 7 iff 2+222775 = 222,777 is. Of course to go further you need trial division (or the standard 'shorten by 1 digit' rule).
But the analogue for 17 (summing digits in groups of 16) is seldom, if ever, worthwhile, and I can't imagine anyone working their way through that rule for 59.
I'm more interested in seeing where the rules come from. So far they come from the factorization of
* n^a, by looking at the last a digits
* n^a - 1, by summing in groups of a digits
* n^a +/- n^b, by (alternate) summing