結果 : how to find the nth term in a non linear sequence