A palindrome is a positive integer whose digits are the same when read forwards or backwards. There are pairs of four digits palindrome whose sum is a five digits palindrome. One such pair is 2882 and 9339. How many such pairs are there?
1 Answer
There are 72 ordered pairs or 36 unordered pairs.
Explanation:
The first palindrome is
and the second is
where
The sum
Therefore
Plugging it in the expression gives
Now there are a few possibilities:
- for
#b+d=0# it's a palindrome (it basically means, that#b=d=0# ) - for
#1<=b+d<=8# it's not a palindrome (try it) - for
#b+d=9# it's 11011+990=12001, not a palindrome
Now we can see that adding 110 again and again gives a palindrome 12221 at
There's 8 ordered pairs of digits that satisfy x+y=11. (try counting from 2+9 to 9+2). For our palindromes there are two solutions:
or
The first one has 8 possibilities, and the second has
If we want unordered pairs we must divide this number by 2. (The procedure would be more sophisticated when there are pairs of equal palindromes, but it's not possible in this scenario, because sum is odd)
You can see your example 2882+9339=12221 belongs to the second category.