Bloomberg interview question

fairly simple recursive mathematical function