|
EXAMPLE
|
There are 10 numbers of the form k + reverse(k) for 1-digit numbers k -- 0, 2, 4, 6, 8, 10, 12, 14, 16, and 18 -- so a(1) = 10.
There are 18 numbers of the form k + reverse(k) for 2-digit numbers k -- 11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 121, 132, 143, 154, 165, 176, 187, and 198 -- and none of these 18 numbers are among the 10 numbers counted in a(1), so a(2) = 10 + 18 = 28.
There are 180 numbers of the form k + reverse(k) for 3-digit numbers k, but exactly one of those -- 121 = 110 + reverse(110) = 110 + 11 -- is also a number of the form k + reverse(k) for a 2-digit number k: e.g., 29 + reverse(29) = 29 + 92 = 121. So a(3) = 10 + 18 + 180 - 1 = 207.
|