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

Why 24?

Age 14 to 16
Challenge Level Yellow starYellow star
Secondary curriculum
  • Problem
  • Getting Started
  • Student Solutions
  • Teachers' Resources

Weida, from Collaton St Mary School, noticed something about question A:
$5 \times 5 = 25, 25 - 1 = 24$
$7 \times 7 = 49, 49 - 1 = 48$
$11 \times 11 = 121, 121 - 1 = 120$
I noticed that the result for the second calculation in each example was equal to the product of the numbers on either side of the prime number that I started with.

Masood, Akeel and Dolapo from Wilson's School, and Rajeev from Fair Field Junior School used algebra to explain:

$(x - 1)(x + 1) = x^2 - x +x -1 = x^2-1$

Aidan, Elliott, Mark, Mark, Michael and Miriam, from Curtin Primary school in Canberra, sent in their explanations for each part:
A) If you multiply the numbers on either side of x by each other you get one less than the square of x. This can be represented as :$( x + 1 ) \times ( x - 1 ) = x^2 - 1$

B) Because there is only two numbers between two consecutive multiples of 3, every third number is a multiple of 3.

C) If you multiply coprime factors of x you get another factor of x or x itself.

D) They are all divisible by 4 because even numbers are every second number. Multiples of 4 are every fourth number therefore, every second even number will be a multiple of 4. That means the one of our numbers will be a multiple of 4.

Final Challenge They are all divisible by 24. Why? What if we put the numbers in the formula for A? Since we are squaring the prime $x$ and subtracting one we have $(x+1)\times(x-1)$

$x$ cannot be divisible by three so one of the numbers either side must be - $(x+1)$ or $(x-1)$
This means that $x^2-1$ is a multiple of 3.
Every second even number is a multiple of 4 (see D) therefore every other even number is a multiple of 2. Since $x$ cannot be divisible by 2, then $x+1$ is divisible by 2 & $x-1$ is divisible by 4 (it could be the other way around).

We are multiplying a multiple of 2 by a multiple of 4 so $x^2-1$ is a multiple of 8. That means that $x^2-1$ is a multiple of 8 & 3. We can't multiply normal factors but 3 & 8 are coprime and multiplying coprime factors will result in another factor so 3 x 8 is 24. $ x^2-1$, the final number is divisible by 24.
Isabella and Ian, from Cashmere High School in Christchurch, and Richard from Comberton Village College, sent us similar algebraic arguments.

Hannah, from Munich International School, Preveina, from Crest Girls' Academy tried squaring some prime numbers and subtracting 1, and verified that they were all divisible by 24.

Finally, well done to Patrick from Woodbridge School, and Andrew who didn't give his school name, who both used modular arithmetic. Here is Andrew's explanation:

The challenge asked to pick a prime number greater than 3, so let p be such a prime.
Squaring p then subtracting one is the difference of two squares: $p^2 - 1 =(p-1)(p+1)$
So we can look at the properties of $(p-1)$ and $(p+1)$ rather than $p^2 -1$.

Since p is a prime, p is not divisible by 3. Hence it either has the remainder 1 or the remainder -1 when divided by 3.
Case 1: $p = 1$ (mod 3) $\Rightarrow p - 1= 0$ (mod 3)
Therefore $p - 1$ is divisible by 3.

Case 2: $p = -1$ (mod 3) $\Rightarrow p + 1 = 0$ (mod 3)
Therefore $p + 1$ is divisible by 3.
We have concluded regardless of the remainder when p is divided by 3, either $p-1$ or $p+1$ is divisible by 3.

Now consider p modulo 4. p cannot equal 0 (mod 4) otherwise it would not be prime. p also cannot equal 2 (mod 4) because it would then be divisible by 2, and p is a prime greater than 2. Therefore $p = 1$ or $p = 3 = -1$ (mod 4).

Case 1: $p = 1$ (mod 4) $\Rightarrow p - 1 = 1 - 1 = 0$ (mod 4) and $p + 1 = 1 + 1 = 2$ (mod 4)
Therefore $p-1$ is divisible by 4 and $p+1$ is divisible by 2.

Case 2: $p = -1$ (mod 4) $\Rightarrow p - 1 = -1 - 1= -2 = 2$ (mod 4) and $p+1= -1 + 1 = 0$ (mod 4)
Therefore $p-1$ is divisible by 2 and $p+1$ is divisible by 4.
Therefore since either $p-1$ or $p+1$ is divisible by 4 and the other 2, their product is divisible by 8. But it was also established previously that $(p-1)(p+1)$ is divisible by 3. Therefore $(p-1)(p+1)$ is divisible by 8 and 3, and therefore 24.

This means for any prime $p > 3$, $p^2 - 1 = (p-1)(p+1)$ is divisible by 24.






You may also like

Doodles

Draw a 'doodle' - a closed intersecting curve drawn without taking pencil from paper. What can you prove about the intersections?

Russian Cubes

I want some cubes painted with three blue faces and three red faces. How many different cubes can be painted like that?

Polycircles

Show that for any triangle it is always possible to construct 3 touching circles with centres at the vertices. Is it possible to construct touching circles centred at the vertices of any polygon?

  • 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