結果 : arithmetic progression nth term in python