Pergunta de entrevista da empresa Infosys

Code an arithmetic series using any programming language I know.