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

Pair Squares

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

Solutions are given here for finding sets of three numbers such that the sum of any two of them is a perfect square. Can you generalize the methods to find sets of four numbers with this property?

Hyeyoun Chung from St Paul's Girls' School noticed that if the square numbers chosen are: $x^2$, $(x+1)^2$ and $(x+3)^2$ and the corresponding set of three integers are $a,\ b$ and $c$, with $a< b< c$ and: $$\eqalign{ a + b &= x^2 \cr a + c &= (x + 1)^2 \cr b + c &= (x + 3)^2 }.$$ then these these three equations can be solved to give: $$\eqalign { c &= {x^2 + 8x + 10 \over 2} \cr b &= {x^2 + 4x + 8 \over 2} \cr a &= {x^2 -4x - 8 \over 2} }.$$

Therefore, from a single square number, $x^2$, three integers $a$, $b$ and $c$ can be found with values such that the sum of any pair of these numbers is a perfect square. The only problem with this system is, however, that the square number must be even, otherwise $a$, $b$ and $c$ will not be integers.

Yatir Halevi tackled the problem as follows:

We are given 3 square numbers: $a^2,\ b^{2}$ and $c^{2}$, and we have to find a general formula for finding 3 integers that are 'Pair Squares' such that the sum of any pair is a square number, that is: $x+y=a^2$, $y+z=b^2$ and $x+z=c^2$.

Solving for $x,\ y$ and $z$ we get:

$$\eqalign{ a^2-b^2 &= x-z \cr c^2 &= x+z \cr 2x &= a^2 + c^2 - b^2 \cr x &= (a^2- b^2 + c^2)/2}$$

By the same methods we get: $$\eqalign{ y &=(a^2+b^2-c^2)/2 \cr z &=(-a^2+b^2+c^2)/2.}$$

In order for $x,\ y$ and $z$ to be integers; either $a,\ b$ and $c$ are all even or two are odd and the other is even because if an integer $n$ is even or odd so is its square. This is proved as follows: if $n$ is odd then it can be written $n=2m+1$, so $n^2=(2m+1)^2=4m^2+4m+1=2(2m^2+2m)+1=2q+1$ which is odd. If $n$ is even then $n=2m$, so $n^2=(2m)^2=4m^2=2(m^2)$ which is even.

For the first case we can generate Pair Squares by choosing any three even squares, for example 4, 16 and 36 and the formula gives:

$$\eqalign { x &= (4 -16 + 36)/2 = 12 \cr y&= (4 + 16 -36)/2 = -8 \cr z&= -4 +16 +36)/2 = 24. }$$ This is a set of pair squares because $12-8=4$, $-8+24=16$ and $24+12=36$.

For the second case we can generate Pair Squares by choosing any two odd squares together with one even square, for example 9, 1 and 4 and the formula gives: $$\eqalign { x &= (9 - 1 + 4)/2 = 6 \cr y&= (9 + 1 - 4)/2 = 3 \cr z&= -9 +1 + 4)/2 = -2. }$$

Checking that this is a set of pair squares we have $6+3=9,\ 3-2=1,\ 6-2=4$.

As for four integers that are pair squares: take an even square $a^2$ and halve it and you have $b=a^2/2$ giving $\{b,\ b,\ b,\ b\}$ for example $\{8, 8, 8, 8\}$ or $\{8,8,8,17\}$.

Saul Foresta used a similar method and gave the following example: $x=54$, $y=10$ and $z=90$

You may also like

Absurdity Again

What is the value of the integers a and b where sqrt(8-4sqrt3) = sqrt a - sqrt b?

Old Nuts

In turn 4 people throw away three nuts from a pile and hide a quarter of the remainder finally leaving a multiple of 4 nuts. How many nuts were at the start?

Just Touching

Three semi-circles have a common diameter, each touches the other two and two lie inside the biggest one. What is the radius of the circle that touches all three semi-circles?

  • 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