Chris Smith’s passion for maths has worldwide reach beyond his state school in the Ayrshire town of Kilmarnock