#### You may also like ### Fibs

The well known Fibonacci sequence is 1 ,1, 2, 3, 5, 8, 13, 21.... How many Fibonacci sequences can you find containing the number 196 as one of the terms? ### Hallway Borders

What are the possible dimensions of a rectangular hallway if the number of tiles around the perimeter is exactly half the total number of tiles? ### Not a Polite Question

When asked how old she was, the teacher replied: My age in years is not prime but odd and when reversed and added to my age you have a perfect square...

# Cakes and Buns

##### Age 11 to 14 ShortChallenge Level

Answer: 9 cakes and 7 buns

Spotting patterns in the numbers
One cake + one bun = 23p + 39p = 62p

512 $\div$ 62 = 8 remainder 16, so buying 8 cakes and 8 buns costs 16p less

16 = 39 - 23 is the difference between them

So buy one more bun and one less cake
7 cakes and 9 buns

Using algebra
$23a$     $+$     $39b$     $=$     $512$
Those numbers are not very easy to work with so try writing it differently...

$23(a+b)$   $+\underbrace{16b}_{\text{multiple of 16}}=\underbrace{512}_{\text{multiple of 16}}$
So $(a+b)$ must be a multiple of $16$ as well.

Try $a+b=16$

$23\times16$      $+$     $16b$      $=$     $512$
$368$       $+$     $16b$      $=$     $512$
$16b = 512 - 386 = 144$
$144=9\times16$ so $b=9$ and so $a=7$

This problem is taken from the UKMT Mathematical Challenges.
You can find more short problems, arranged by curriculum topic, in our short problems collection.