Palindromic Number Problem

97 Views Asked by At

Suppose $a$ be a 28-digit palindromic number. Given that $a$ is a multiple of $13$ and all the digits except the 13th, 14th, 15th, and 16th are $1$. Let $A, B, C, D$ be the 13th, 14th, 15th, and 16th digits respectively. What is the possible minimum value of $A+B+C+D$?

I am trying to track the divisibility rule of $13$, but seems can't solve the problem above. It is just too complicated and long.

Would you help me? Thanks for that.

2

There are 2 best solutions below

0
On

Use the fact that $13$ divides $1001$. So, like the divisibility test for $11$ but in base $1000$ instead of base $10$, set off groups of three digits from the right and take the alternating sum.

You should find that the $1$ digits cancel and at the end, $BCD-A$ must be a multiple of $13$.

Since the number is palindromic $B=C$ and $A=D$. Thus $BB0$ is to be a multiple of $13$, forcing $B=0$ but allowing a free choice for $A$. Therefore the minimal sum is $0+0+0+0=0$.

0
On

To avoid a long divisibility test, we can start from the fact that $13$ divides $1001$ and use some arithmetical knowhow:

$1001\times111=111111$ (Six $1$s)
$111111\times1000001=111111111111$ (Twelve $1$s)
$1111,1111,1111\times1,0000,0000,0000,0001=1111,1111,1111,0000,1111,1111,1111$
(Twelve $1$s, four $0$s, twelve $1$s. Commas added to clearly show how many digits there are.)

This last number is the required $28$-digit palindrome, has been shown to be a multiple of $13$, and has $A+B+C+D=0$ which must therefore be the minimal sum.