Skip over navigation
Cambridge University Faculty of Mathematics NRich logo
menu search
  • Teachers expand_more
    • Early years
    • Primary
    • Secondary
    • Post-16
    • Events
    • Professional development
  • Students expand_more
    • Primary
    • Secondary
    • Post-16
  • Parents expand_more
    • Early Years
    • Primary
    • Secondary
    • Post-16
  • Problem-Solving Schools
  • About NRICH expand_more
    • About us
    • Impact stories
    • Support us
    • Our funders
    • Contact us
  • search

Or search by topic

Number and algebra

  • The Number System and Place Value
  • Calculations and Numerical Methods
  • Fractions, Decimals, Percentages, Ratio and Proportion
  • Properties of Numbers
  • Patterns, Sequences and Structure
  • Algebraic expressions, equations and formulae
  • Coordinates, Functions and Graphs

Geometry and measure

  • Angles, Polygons, and Geometrical Proof
  • 3D Geometry, Shape and Space
  • Measuring and calculating with units
  • Transformations and constructions
  • Pythagoras and Trigonometry
  • Vectors and Matrices

Probability and statistics

  • Handling, Processing and Representing Data
  • Probability

Working mathematically

  • Thinking mathematically
  • Developing positive attitudes
  • Cross-curricular contexts

Advanced mathematics

  • Decision Mathematics and Combinatorics
  • Advanced Probability and Statistics
  • Mechanics
  • Calculus

For younger learners

  • Early Years Foundation Stage

Check Code Sensitivity

Age 14 to 16
Challenge Level Yellow star
  • Problem
  • Getting Started
  • Student Solutions

Well done Andrei Lazanu, age 14, School No. 205, Bucharest, Romania and Robert Goudie, age 17, Madras College, Fife, Scotland for these solutions.

I worked the problem considering two distinct possible errors: miscopying a single digit, and transposing two adjacent digits.

1. Miscopying a single digit
For a US Postal Service Money Order the condition for a valid number is:

$$a_1 + a_2 + . . . + a_{10} = a_{11} \ {\rm mod\ 9}.$$

Let's say the operator changes $a_n$ to $a_{n'}$ where these are any positive integers between 0 and 9. The condition the machine doesn't find the error is that the new number is also a valid money order number. So $a_n - a_{n'}\equiv 0 \hbox{ mod 9}$. This can happen only when the operator changes 0 with 9 or 9 with 0 for any digit including the first one (which could be 0). In all other cases the error will be found. Now I'll examine separately the case of the check digit. The same rule holds for it too, because I must look at the congruence mod 9, i.e. if there is an error in the check digit it is not detected by the machine if 0 is replaced by 9 or 9 by 0.

For an Airline Ticket, in order the machine does not find the error, the difference between the numbers obtained omitting the check digit, in the correct and in the miscopied form, must be a multiple of 7. But, if the difference of two numbers differing only in one digit is a multiple of 7, the numbers must differ by 7, 70, 700, 7000 ... and this means the difference of the two digits must be 7. The machine will not find the error if the operator changes 0 with 7, 1 with 8 or 2 with 9, or 7 with 0, 8 with 1, 9 with 2. The same is valid for the check digit too.

2. Transposing two adjacent digits
For the US Postal Service Money Order numbers the machine won't find the error except transposing the check digit. The machine doesn't find it because the addition is commutative.

For Airline Ticket numbers I work on the number omitting the check digit. The miscopied number goes undetected when the remainders after division of the numbers by 7 are the same that is when the difference of the two numbers is a multiple of 7. Let the two adjacent digits be a and b so the difference between the two numbers is a power of 10 times 9(a - b). If this is a multiple of 7 then (a - b) is a multiple of 7. The error will be undetected if the adjacent digits transposed are 0 and 7 or 1 and 8 or 2 and 9.

You may also like

More Mods

What is the units digit for the number 123^(456) ?

Mod 3

Prove that if a^2+b^2 is a multiple of 3 then both a and b are multiples of 3.

Novemberish

a) A four digit number (in base 10) aabb is a perfect square. Discuss ways of systematically finding this number. (b) Prove that 11^{10}-1 is divisible by 100.

  • Tech help
  • Accessibility Statement
  • Sign up to our newsletter
  • Twitter X logo

The NRICH Project aims to enrich the mathematical experiences of all learners. To support this aim, members of the NRICH team work in a wide range of capacities, including providing professional development for teachers wishing to embed rich mathematical tasks into everyday classroom practice.

NRICH is part of the family of activities in the Millennium Mathematics Project.

University of Cambridge logo NRICH logo