Number of five digit palindromes that are a sum of two four digit palindromes

698 Views Asked by At

Let $x$ and $y$ be two $4$ digit palindromes and $z$ be a five digit palindrome. If $x + y = z$, how many values of $z$ are possible ? (A palindrome is a number which reads the same forwards and backwards.)

I took the case where the palindromes were all made of the same digit and found that $12221$ can be a possible value of $z$ ( $6666,5555$ being the $4$ digit palindromes.)

I don't know how to proceed further.

1

There are 1 best solutions below

0
On BEST ANSWER

For convenience, denote \begin{equation} x=\overline{abba}=1001a+110b, y=\overline{cddc}=1001c+110d, z=\overline{efgfe}=10001e+1010f+100g \end{equation}

\begin{equation} 1001(a+c)+110(b+d)=x+y=z=10001e+1010f+100g \end{equation}

Note that $10^4 \leq z=x+y<1000(a+1)+1000(c+1) \leq 2(10)^4$. Therefore $z$ has leading digit $e=1$. Now $a+c \equiv e \equiv 1 \pmod{10}$, but $1000(a+c+2)>10^4$ so $a+c \not =1$. Thus $a+c=11$.

Therefore

\begin{equation} 11011+110(b+d)=10001+1010f+100g \\ 1010+110(b+d)=1010f+100g \\ 11(b+d)=101(f-1)+10g \end{equation}

Since $10g<101$, $f \not =0$. Since $11(b+d) \leq 11(18)<2(101)$, $f \leq 2$. Thus $f=1, 2$.

If $f=1$, we have $11 \mid g$, so $g=0$, so $b+d=0$, so $b=d=0$. This gives the solutions $2002+9009=3003+8008=4004+7007=5005+6006=11011$.

If $f=2$, we have $11(b+d)=101+10g$, so $0 \equiv 101+10g \equiv 2-g \pmod{11}$, so $g=2$. Thus $b+d=11$. This gives $z=12221$, with $a+c=b+d=11$. (and so we could have $5445+6776=12221$ for example)

There are thus 2 possible values of $z$.