The alternating digit sum of a nonnegative integer in radix iswith a positive sign on the units digit. Starting the signs from the opposite end can change the overall sign, so the convention should be stated.
Because , the positional expansion gives . This proves a divisibility test: divides the number exactly when it divides its alternating digit sum. In decimal notation, has alternating sum and equals .
The rule differs from the ordinary digit sum test modulo , which instead uses . Both follow from the same modular arithmetic principle of replacing the radix by its residue before evaluating the digit polynomial.
Articles by others on the same topic
There are currently no matching articles.