Nokia Interview Question

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