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

Basic Rhythms

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

$987654321$ $=$ $8$ $\times$ $123456789$ $+$ $9$
$98765432$ $=$ $8$ $\times$ $12345678$ $+$ $8$
$9876543$ $=$ $8$ $\times$ $1234567$ $+$ $7$
$987654$ $=$ $8$ $\times$ $123456$ $+$ $6$
...
$9$ $=$ $8$ $\times$ $1$ $+$ $1$

Saul Foresta explained as follows why this pattern holds in the decimal system and in other number systems using bases other than base $10$:

I generalized the problem for any base $n$ and any number of digits $r$ where $r$ can be anywhere from $1$ to $(n - 1)$.

Then after rewriting both sides of the equality given in the problem using sigma notation I arrived at the following:

$$ {\sum_{k=1}^r (n-k)n^{r-k}} = {{(n-2)\sum_{k=1}^r kn^{r-k} + r}} $$

In each summation $k$ stands for the $k$th digit of the number we're dealing with, reading from left to right. For example, in the number $9876$, $k$ ranges from $1$-$4$, where $9$ is $k=1$, $8$ is $k=2$, and so on.

So all I need to do in order to prove that this pattern holds is show that the left side of this equality does indeed equal the right side. Taking the terms like $8 \times123456789$, that is

$$ (n-2)\sum_{k=1}^r kn^{r-k} $$

over to the left hand side, we will prove that this expression is equal to $r$.

[(n-1)n r-1 + (n-2)n r-2 + (n-3)n r-3 + ... + (n-r)] - (n-2)[n r-1 + 2n r-2 + 3n r-3 + ... + r] =
[n r - n r-1 + n r-1 - 2n r-2 + n r-2 - 3n r-3 + ...+ n - r] - [n r - 2n r-1 + 2n r-1 - 2.2n r-2 + ... + (n-2)r]

The coefficient of $n^{r-k}$ on this left hand side is $[1-k] - [k+1-2k] = 0$ for

$ ( 1 \le k \le r-1) $

and the coefficient of $n^r$ is also $0$.

The coefficient of $n^0$ is $[-r] - [-2(r)] = r$ and hence this expression is equal to $r$ as required.


You may also like

Code to Zero

Find all 3 digit numbers such that by adding the first digit, the square of the second and the cube of the third you get the original number, for example 1 + 3^2 + 5^3 = 135.

Binary Squares

If a number N is expressed in binary by using only 'ones,' what can you say about its square (in binary)?

Learn about Number Bases

We are used to writing numbers in base ten, using 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. Eg. 75 means 7 tens and five units. This article explains how numbers can be written in any number base.

  • 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