="Joerg Arndt" <arndt@jjj.de> For every base b and every (tentative) divisor d one can obtain a periodic sequence of weights such that the weighted sum of digits tells whether a base-b number is divisible by d.
Yes, I recall working out a similar thing some years ago, and being amused that one could reasonably easily mentally test for divisibility by, say, 17 or 19 (which may come in handy for factoring the number on my alarm clock). As a kid I encountered "The Trachtenberg Method of Speed Mathematics" which espouses a bunch of special-case methods for rapidly multiplying by specific small d. The divisibility tests here are sort of related. It's kind of interesting that this weighted-summing works LSB-to-MSB, the opposite of naïve long division.
IIRC the sequence of weights corresponds to the sequence b^n mod d.
Something like that. There may be something special about initializing the digit reduction? Also, you may still need to memorize a few small multiples of the divisor for the end test (like 38, 57, 76, 95 for 19)
I once wrote that up (on paper) but that is certainly lost.
Right, in fact I may even have mentioned it on math-fun (or decided it was too trivial)
Cannot recall the details from the top of my head, should be easy, though.
Heh, yeah, I get that feeling a lot these days. Best regards, --MLB