You are viewing a single comment's thread. Return to all comments →
I'm unable to understand your last statement.
"along with the fact that if sum of first 2 terms exceeds limit till you have to search palindrome(N), you should break the loop" ?
Are you following brute force approach to compute sigma(a^2(n,d)) for all possible combinations of a,n.
Or are you using some pruning strategry by prestoring all possible palindromes. and looking for few combinations for a,n that will get to the desired palindrome.
Thanks for the post.