Rudder Analytics interview question

pentagonal number series in programming round.