Viridien Interview Question

question on an aritmetic progression