Infor Interview Question

write fibonacci series logic