This problem requires children to apply their knowledge of factors and multiples, and is a good way of making the link between sharing, division and multiples/factors. It may also be used to introduce learners to the fact that a problem can have more than one solution and that the solutions can be generalised.
It can be approached in many different ways so can be a useful context in which to talk about different ways of recording and different methods of solving problems.

It might be useful to break this problem down into two stages and you could decide whether to introduce it as two parts or whether to give children the whole problem, then break it down. You could start on the carpet area with some cubes (or sweets or any group of objects). Tell the class that you're going to pick out six cubes and then arrange them in groups of two on the carpet. Ask them
what will happen. Demonstrate this process and emphasise that all the cubes have been put into groups. Ask the children what would happen if you did the same thing but this time with seven cubes. Once they have shared their suggestions, verify their predictions using cubes. This time there is one left over. You can then lead them into the first part of the problem. Encourage learners to work with
a partner, using paper or small whiteboards, and to record whatever they find helpful.

Bring the group together after a short time to discuss what they think. Many might have specific examples of numbers that would work so you could ask questions to help them generalise, like "Could there have been sixteen lollies? Why?" or "Could there have been five lollies? Why?" Back on the carpet, you can then move on to the second part of the problem. Suggest to the class that you have
nine cubes, which will give one left if they are grouped in twos. Ask what will happen if you group them into fives and invite predictions before asking a child to demonstrate. After talking this through, lead into the second challenge.

As you walk around the room listening to the children talking about their work, look for examples of different ways of recording and different ways of approaching the problem to share with everyone in a plenary. Some children might have tried numbers randomly, others might have had a system, working up in order of size, for example.

Which numbers of cubes will have one cube left over when they're grouped in twos?

How could you find out which of these will have two left over when they're grouped in fives?

You could ask what numbers of cubes this would work for if there were more than twenty. Can children easily predict the numbers that can be grouped in these ways? The Lots of Lollies problem does just that.

Children might find it useful to record their results on a hundred square.