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

Digit Sum

Age 14 to 16
ShortChallenge Level Yellow starYellow starYellow star
Secondary curriculum
  • Problem
  • Solutions

The problem was "What is the sum of all the digits in all the integers from one to one million?" and it was not intended to be a long hard grind doing lots of adding up.


The very first solution of the month came from Joshua from Russell Lower school in Ampthill, Beds. He took three days to come up with a solution done the hard way. His method was well thought out, and very clearly explained, and his answer was so nearly correct that we even suspected a typo in the answer he gave. No-one else sent in an answer as close as Joshua's.


The hint was "Take your partners and leave the big one to stand alone". Well the big one is of course one million but if he stands alone then there are an odd number of players in this game (1 to 999,999) and you have to bring in an extra in order that each has a partner.

This is the secret, bring in zero who won't add up to much! Take 0 with 999,999, then 1 with 999,998, then 2 with 999,997 , 3 with 999,996 and so on. There are altogether half a million, that is 500,000, pairs of numbers.

Adding the two numbers in each pair requires no carrying because, in each place (units, tens, hundreds places etc.) the digits add up to 9. The digits in each of these pairs add up to 54 (equal to 9 x 6) and then there is the number 1,000,000 which stands alone. You can now work out the sum of the digits in your head, it is

500,000 x 54 + 1 = 27,000,001

You can find more short problems, arranged by curriculum topic, in our short problems collection.

You may also like

Eight Dominoes

Using the 8 dominoes make a square where each of the columns and rows adds up to 8

Two and Two

How many solutions can you find to this sum? Each of the different letters stands for a different number.

Magic Squares for Special Occasions

This article explains how to make your own magic square to mark a special occasion with the special date of your choice on the top line.

  • 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