結果 : algorithm for number pattern in python