--- id: 5900f3f91000cf542c50ff0b title: '問題 141:累進平方數 n' challengeType: 5 forumTopicId: 301770 dashedName: problem-141-investigating-progressive-numbers-n-which-are-also-square --- # --description-- 一個正整數 $n$ 除以 $d$ 後得到商 $q$ 和餘數 $r$。 同時 $d$,$q$ 和 $r$ 是一個等比數列中三個連續的正整數項,但順序不要求一致。 例如,58 除以 6 後得到商 9 和餘數 4。 可以發現,4、6、9 構成一個等比數列的連續三項(公比爲 $\frac{3}{2}$)。 我們稱這樣的數字 $n$ 爲累進數。 一些累進數,如 9 和 10404 = ${102}^2$,同時也是完全平方數。 所有小於十萬的累進平方數之和爲 124657。 請求出所有小於一萬億(${10}^{12}$)累進平方數之和。 # --hints-- `progressivePerfectSquares()` 應該返回 `878454337159`。 ```js assert.strictEqual(progressivePerfectSquares(), 878454337159); ``` # --seed-- ## --seed-contents-- ```js function progressivePerfectSquares() { return true; } progressivePerfectSquares(); ``` # --solutions-- ```js // solution required ```