Problem 125
Palindromic sums
The palindromic number 595 is interesting because it can be written as the sum of consecutive squares: 62 + 72 + 82 + 92 + 102 + 112 + 122.
There are exactly eleven palindromes below one-thousand that can be written as consecutive square sums, and the sum of these palindromes is 4164. Note that 1 = 02 + 12 has not been included as this problem is concerned with the squares of positive integers.
Find the sum of all the numbers less than 108 that are both palindromic and can be written as the sum of consecutive squares.
回文和
回文数595很有趣,因为它可以写成连续平方数的和:62 + 72 + 82 + 92 + 102 + 112 + 122。
恰好有十一个小于一千的回文数可以写成连续平方数的和,这些回文数的和是4164。注意1 = 02 + 12并没有算在内,因为本题只考虑正整数的平方。
在小于108的数中,找出所有可以写成连续平方数的和的回文数,并求它们的和。