Number play – Kaprekar's routine, palindromes, digit sums, odd and even numbers and magic squares

MathematicsNumbers & ArithmeticAges 11–12

Use with my class

Explore number puzzles step by step: Kaprekar's routine takes every four-digit number whose digits are not all the same to 6174 in at most 7 steps; reversing and adding turns most numbers into palindromes; digit sums make patterns on a hundred square; odd and even numbers add by fixed parity rules, and the first n odd numbers add up to n². Build 3 × 3 magic squares whose rows, columns and diagonals all have the same sum, and see how one can be built.

Lesson: Number play: Kaprekar's constant, palindromes, digit sums, parity and magic squares

What it shows

Number play turns simple rules into surprising patterns. In Kaprekar's routine you arrange the four digits of a number from largest to smallest and from smallest to largest and subtract; repeating this reaches 6174, the Kaprekar constant, in at most seven steps, unless all four digits are the same. Reversing a number and adding usually gives a palindrome, though for 196 none is known. The sim also colours digit sums on a hundred square, shows with pairs of dots why odd plus odd is even, builds the sums of odd numbers into squares and checks 3 × 3 magic squares line by line.

How to use

Choose a tab. In Kaprekar type a Starting number and press Run the routine or Next step; the chart shows how many steps every four-digit number needs. In Palindromes press Reverse and add. In Digit sums choose the Numbers and a Digit sum. In Odd and even set the counts, predict, then press Add them up. In Magic squares tap a number, then a cell, and press Check.

Parameters you can change

  • Screen Kaprekar's routine, Palindromes, Digit sums, Odd and even, Magic squares
  • Starting number (Kaprekar) 0–9999
  • Starting number (palindromes) 1–9999
  • Hundred block (0 is 0–99) 0–9
  • Digit sum 1–27
  • Odd numbers 0–5
  • Even numbers 0–5
  • First odd numbers added (n) 1–12
  • Smallest number of the magic square 1–20

Questions to explore

  1. Why must a number with four equal digits be left out of Kaprekar's routine?
  2. Why can five odd numbers never add up to 30?
  3. Why must the magic sum of a 3 × 3 magic square made from 1 to 9 be 15?