# Puzzles

## Square and cube endings

Source: UKMT 2011 Senior Kangaroo

How many positive two-digit numbers are there whose square and cube both end in the same digit?

#### Show answer & extension

#### Hide answer & extension

Only the units digit of the number will affect the last digit of the square and cube. This table shows how the last digits of the square and cube depend on the last digit of the number:

Last digit of... |

number | square | cube |

0 | 0 | 0 |

1 | 1 | 1 |

2 | 4 | 8 |

3 | 9 | 7 |

4 | 6 | 4 |

5 | 5 | 5 |

6 | 6 | 6 |

7 | 9 | 3 |

8 | 4 | 2 |

9 | 1 | 9 |

So numbers ending in 0, 1, 5 and 6 will have squares and cubes that end in the same digit. There are 4×9=**36** two-digit numbers then end in one of these digits.

#### Extension

How many two-digit numbers are there in binary whose square and cube end in the same digit?

How many two-digit numbers are there in ternary whose square and cube end in the same digit?

How many two-digit numbers are there in base \(n\) whose square and cube end in the same digit?

## What's the star?

In the Christmas tree below, the rectangle, baubles, and the star at the top each contain a number. The square baubles contain square numbers; the triangle baubles contain triangle numbers; and the cube bauble contains a cube number.

The numbers in the rectangles (and the star) are equal to the sum of the numbers below them. For example, if the following numbers are filled in:

then you can deduce the following:

What is the number in the star at the top of this tree?

*You can download a printable pdf of this puzzle here.*#### Show answer

#### Hide answer

The two numbers between 14 are a cube number and a triangle number: these must be 8 and 6. Next you can see that 23 is the sum of 8, two times a triangle number and a square number: the triangle and square numbers must be 3 and 9.

Next, call the square number at the bottom left \(a\), the square number at the top left \(b\), and the triangle number at the top right \(c\). Adding upwards, we find that \(a+b+45=106\) and \(a+141+c=198\); and so \(a+b=61\) and \(a+c=57\). The only two square numbers that add to 61 are 25 and 36. Therefore \(c\) must be 21 or 32, but must be 21 as 32 is not a triangle number. And so \(a\) is 36 and \(b\) is 25.

Putting all these numbers into the tree gives the top number as

**433**. This is fitting because 433 is in fact a

star number: