Nokia interview question

Given a Number Series, find its logic and create a program, and optimize it.