Pregunta de entrevista de Optiver

Predict next number in a sequence