Project Euler [Problem 44]
間が開いた
問題
Pentagon numbers
Pentagonal numbers are generated by the formula, . The first ten pentagonal numbers are:
1, 5, 12, 22, 35, 51, 70, 92, 117, 145, ...
It can be seen that . However, their difference, 70 − 22 = 48, is not pentagonal.
Find the pair of pentagonal numbers, and , for which their sum and difference are pentagonal and is minimised; what is the value of D?
私訳
五角数
五角数は式 で与えられる。 最初の 10 個は:
1, 5, 12, 22, 35, 51, 70, 92, 117, 145, ...
であるが、 差 70 − 22 = 48 を見るとこちらは五角数ではない。
五角数の組 , で、その和と差がいずれも五角数となり、 かつ差 が最小となるものを見つけよ。 その時差 D の値はいくつか?
解答方針
力任せに探索したら見つかってしまった……。