Digit puzzles
Mathematicians have always loved playful puzzles where the only rules are arithmetic. Many of these puzzles look mysterious until you peek behind the curtain , then they become beautiful patterns. Some are over years old.
Concept
Magic squares. A magic square is a square grid filled with numbers so that every row, every column, and both diagonals add to the same total , the magic sum. The most famous is the Lo-Shu square:
Every row, column, and diagonal sums to . The numbers - each appear exactly once. A medieval Indian magic square attributed to Khajuraho temples uses the numbers - on a grid with magic sum .
General formula. A magic square using has magic sum . For this gives . For , . For , .
Palindromic numbers. A palindrome reads the same forwards and backwards: . Multiplying small palindromes can give larger palindromes: , , . Up to the pattern (rows of Pascal's triangle) gives palindromes.
Cyclic numbers. The decimal expansion of has a remarkable property:
Every product is a cyclic rotation of the digits . And .
Digit-sum tricks. Pick any number, say . Reverse: . Subtract the smaller from the larger: . Now , and . Try any starting number , you always end up at (or if the digits are equal). Why? Because the difference of a number and its reverse is a multiple of .
trick. Pick any -digit number whose first and last digits differ by at least . Reverse it. Subtract smaller from larger. Reverse the result and add. You always get . Try :
This works for the same digit-sum reason but with two reversals.
Worked examples
Example 1. Find the missing entries in this magic square (magic sum ):
- Top middle: .
- Bottom middle: .
- Middle left: .
- Middle right: .
Example 2. Verify does NOT have a simple cyclic pattern.
- .
- digits , no longer fits the -digit cycle (because , you have crossed beyond the boundary).
Example 3. Try the trick on .
- . (Yes, minus its reverse, .)
- Reverse .
- . ✓
Example 4. A magic square's magic sum is . If the numbers are -, this is a . Find the diagonal sum if one diagonal is .
- . ✓
Try it yourself
- Complete this magic square with magic sum : only , , in top row, , in bottom row.
- Compute . Is it a palindrome?
- Verify is a cyclic rotation of .
- Try the trick on three different -digit numbers and check.
- The magic sum of a magic square using - is . Show your reasoning.
- Show that the difference of any -digit number and its reverse is a multiple of .
- Find a -digit palindrome divisible by .
- List all -digit palindromes divisible by . (Hint: every -digit palindrome has form .)
Activity
Make your own magic. Try to build a magic square using the numbers through . There are several known constructions , one famous one is Albrecht Durer's square from the engraving Melencolia I (). Look it up online; the bottom row even contains the year . Once built, verify that all rows, columns, both diagonals, and even the four corners sum to .