The Secret Mathematics of Everyday Numbers
Chapter Field Guide
- Number theory and modular arithmetic: remainders, multiples and complements.
- Weighted sums, check digits and repeating patterns; the MOD 10, MOD 11 and MOD 97 families.
- Information coding: single-digit substitutions, transpositions and the limits of error detection.
- Book and magazine identifiers, retail labels and shipping container codes.
- Bank references, equipment identifiers on phones and machine-readable travel documents.
- Inventory and library systems use structured labels to detect some typing mistakes.
- Explain why a number can fail a check even before a database lookup.
- Build and test three JavaScript checkers using fictional training data.
- Design your own library label system and distinguish mathematical consistency from genuine identity or authorization.
Measurable Learning Outcomes
- Apply modular arithmetic (mod 10 and mod 11) to verify identification numbers.
- Explain why positional weights catch adjacent digit swaps that plain sums miss.
- Compute Luhn and weighted-sum check digits in JavaScript.
Core Scientific Intuition
A plain sum of digits catches a single changed digit, but swapping two neighboring digits (like 47 to 74) leaves the sum unchanged. Multiplying each position by a distinct weight before taking a remainder breaks that symmetry so transpositions change the check digit.
Units & assumptions: d_i are decimal digits (0–9, plus X=10 in ISBN-10); w_i are position weights; m is 10 (Luhn/EAN) or 11 (ISBN-10).
Worked Example
In ISBN-10, weights run from 10 down to 1 modulo 11. Because 11 is prime, swapping any two adjacent digits d_a and d_b changes the weighted sum by (d_a - d_b) mod 11, which is nonzero whenever d_a != d_b.
Hands-On Exploration
Interactive Laboratory
Test the concepts directly with 4 interactive panels, live controls, and visual feedback.
Open Interactive Lab →Three Guided Projects
Structured experiments with hypotheses, boundary tests, hints, and reflection prompts.
View 3 Projects →Source Code (3 Snippets)
Inspect byte-identical printed JavaScript blocks, download `.js` files, or test runnable blocks in the isolated sandbox.
Browse Code →Self-Check Quiz (5 Questions)
Immediate explanations for every choice, unlimited retries, and local-only score tracking.
Take Self-Check Quiz →Book Chapter Outline (Reference Guide)
Section headings from Volume 1 for cross-referencing with the printed book.
Show all 39 book section headings
- A guide to the mathematics of everyday identifiers.
- How a single digit can help detect mistakes in a number.
- The number that refused to work
- Try it before reading on
- Meet the pioneers
- A mathematical proof for a number
- Hans Peter Luhn: a small mechanical idea
- Books, banks and international standards
- Meet the remainder
- A better training-label rule
- The Luhn algorithm, step by step
- Why subtract nine?
- Twelve clues in everyday life
- Six more places where mathematics hides
- Why do rules differ?
- Books, magazines and the number eleven
- What if the check is ten?
- When letters become numbers
- A bank number too large for ordinary arithmetic
- Build a Luhn number detective
- Read the code like a recipe
- Build a universal weighted-sum checker
- One function, many applications
- Design your own reliable library labels
- Why strings matter
- Change a digit. Watch the rule react.
- 07 / Detective mission: the missing science kit
- A clever rule still has blind spots
- Accidental error versus intentional change
- Become the architect of a number system
- 1: The school-library challenge
- 2: The error tournament
- 3: The checksum with letters
- 4: The trustworthy inventory
- Mission answers
- Your field guide to number detectives
- 11 / What you now know
- Next chapter: The secret language of barcodes
- More to discover
Primary Sources & Further Reading
External links are provided for independent verification and deeper study. Link availability can change over time; see the Resources page for verification notes.
| Source | Type | Link |
|---|---|---|
| IBM archival photograph via IEEE Spectrum (reuse permission not verified) | educational-archive | https://spectrum.ieee.org/hans-peter-luhn-and-the-birth-of-the-hashing-algorithm |
| Biographical source | reference | https://ithistory.org/honoree/hans-peter-luhn |
| Family photograph in Tom Verhoeff’s memorial article, Figure 2 (permission not verified) | reference | https://archive.bridgesmathart.org/2018/bridges2018-3.pdf#page=2 |
| Biographical source | reference | https://www.eur.nl/en/ese/news/memoriam-emeritus-professor-jacobus-koos-verhoeff |
| GS1: check digit calculation | reference | https://www.gs1us.org/tools/check-digit-calculator |
| Luhn, H. P. (1960). Computer for verifying numbers. US patent 2,950,048. | reference | https://patents.google.com/patent/US2950048A/en |
| Luhn algorithm, EPFL Graph Search (overview). | reference | https://graphsearch.epfl.ch/en/concept/582440 |
| GSMA. IMEI Database; 3GPP TS 02.16, Annex A (Luhn check calculation). | reference | https://www.gsma.com/get-involved/working-groups/terminal-steering-group/imei-database/ |
| International ISBN Agency. What is an ISBN? | reference | https://www.isbn-international.org/content/what-isbn/10 |
| Swift. International Bank Account Number (IBAN) and registry. | reference | https://www.swift.com/standards/data-standards/iban-international-bank-account-number |
| ICAO. Doc 9303, Part 3: common specifications for machine-readable travel documents. | reference | https://www.icao.int/publications/documents/9303_p3_cons_en.pdf |
| ISSN International Centre. What is an ISSN? | reference | https://www.issn.org/understanding-the-issn/what-is-an-issn/ |
| NHS England. NHS numbers for health and social care organisations. | reference | https://digital.nhs.uk/services/personal-demographics-service/nhs-number |
| Persian Tools. Iranian national ID checksum (public software documentation; not issuer confirmation). | reference | https://persian-tools.js.org/functions/verifyIranianNationalId.html |
| Turkish national ID checksum (public software documentation; not issuer confirmation). | reference | https://github.com/abdulmecidd/trid_validator |
| UIDAI. Aadhaar authentication technical resources (issuer reference). | reference | https://www.uidai.gov.in/ |
| United States, 49 CFR Part 565. Vehicle Identification Number Requirements. | reference | https://www.govinfo.gov/content/pkg/CFR-2024-title49-vol6/xhtml/CFR-2024-title49-vol6-part565.html |
| Bureau International des Containers. Container Check Digit Calculator. | reference | https://www.bic-code.org/check-digit-calculator/ |
| MDN JavaScript Guide | official-docs | https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide |
| 3GPP TS 02.16, Annex A (public specification mirror) | reference | https://itecspec.com/3gpp/02.16/s/annex-a |
| Verhoeff, J. (1969). Error detecting decimal codes. Original dissertation, CWI | reference | https://ir.cwi.nl/pub/32080 |