Invariants Math Example 3
Follow the full solution, then compare it with the other examples linked below.
Example 3
mediumThe sum of digits of a number doesn't change modulo 9 when you add 9. Verify: 47 β 47+9=56. Is the digit sum invariant mod 9?
Solution
- 1 Compute the digit sum of 47: . Then .
- 2 Compute the digit sum of 56: . Then .
- 3 Both digit sums are congruent to 2 mod 9. This works because adding 9 to any number doesn't change its residue mod 9 (since ), and a number's digit sum is always congruent to the number itself mod 9.
Answer
Yes, the digit sum mod 9 is invariant under adding 9. Both 47 and 56 have digit sum .
The digit sum modulo 9 is a classic invariant known as 'casting out nines.' Any number (sum of its digits) , and since , adding 9 preserves this residue. This invariant is useful for checking arithmetic.
About Invariants
Quantities or properties that remain unchanged during a process, operation, or transformationβvalues that stay the same no matter how the system is rearranged or acted upon.
Learn more about Invariants βMore Invariants Examples
Example 1 medium
A sequence starts at 1 and each term is 3 times the previous minus 2: (a_{n+1} = 3a_n - 2). Show tha
Example 2 hardIn a game, you can add 3 or subtract 5 from a number. Starting at 0, can you reach 1? Use an invaria
Example 4 mediumShow that for any right triangle with legs (a, b) and hypotenuse (c), the quantity (a^2 + b^2 - c^2
Example 5 hardA 2Γn grid of squares is colored with 2 colors. You repeatedly flip all colors in any row or column.