There are other available divisibility tests in the literature; see the
MathWorld link below for a good introduction. The immediate impetus to create this Demonstration came from a rereading of Paul M. Cohen's short article "Divisibility Tests Remembered,"
Focus,
23(8), 2003 p. 8. I am indebted to him for the "Brief" notation used in this Demonstration and for reminding me of the fascination of these techniques.
Note: In some of these implementations it is possible to arrive at a negative number in the course of the iteration, and so I have always taken the absolute value of the results where this is a possibility. In a similar vein, the value produced by the divisibility by 6 algorithm is actually the negative of that found by the algorithm described on the
MathWorld page, but it seemed easier to do it mentally this way, and we're taking the absolute value so we're free to use either one. (Caution: This means that

is not necessarily equal to

, but the remainder was not preserved by the 7-rule anyway, so the loss is not great. Whether the remainder is zero or not
is preserved.)