Pergunta de entrevista da empresa Bloomberg

They asked me to solve a recurrence relation question