結果 : finding the nth term in a linear sequence