Optiver interview question

Mental Math and some sequences