Students explored the world of numbers at a festival designed to inspire a love of mathematics.