My goal is to find the largest palindrome which is the product of two 2-digit numbers using the following program. I want the program to add each palindrome it finds, to the list H. I also want it to test all $n$ from $10$ to $99$, on each respective value of $m$ from $10$ to $99$. Where is the error in the following code?
Clear[H];
H = {};
n = 10;
Do[While[n < 100,
If[PalindromeQ[n*m], H = Append[H, m*n]; n = n + 1,
n = n + 1]], {m, 10, 99}];
Max[H]
Permutations[Range[10, 99], {2}]withSubsets[Range[10, 99], {2}]to reduce the search space (multiplication is commutative). If you're already on version 10.3 or higher, usePalindromeQ[]for testing. – J. M.'s missing motivation Jul 30 '17 at 22:35Subsets. - Still on V10 – eldo Jul 30 '17 at 22:47