1

I do not really have much background knowledge in number theory, so maybe this question might be fairly trivial to someone that has more experience in such field. However, I was working on a coding problem and noticed that every even digit palindromic number is divisible by $11$, meaning that if a number such as $126621$ is given, then I already know that one of the factors is $11$. I tried to look up some properties of such numbers but did not really help. I tried the following:

The expression $xyst\cdots tsyx$ indicates a palindromic number, where $x,y,s,t,\dots $ are any integers in $\{0,1,\dots ,9\}$, except for $x$ which cannot be $0$. In general, an even palindromic number may be expressed as, with $k\in\mathbb{N}$,

$$x\cdot10^{2k}+y\cdot10^{2k-1}+\cdots+y\cdot10+x.$$ I want to show that \begin{align*}&0\stackrel{?}{=}x\cdot10^{2k}+y\cdot10^{2k-1}+\cdots+y\cdot10+x\mod 11\\ \Rightarrow \qquad&0\stackrel{?}{=}x(10^{2k}+1)+10y(10^{2k-2}+1)+\cdots\mod11\\ \Rightarrow\qquad&0\stackrel{?}{=}\left[\left(x(10^{2k}+1)\mod11\right)+\left(10y(10^{2k-2}+1)\mod11\right)+\cdots\right]\mod 11 \end{align*} as it can be seen each exponent of $10$ is even. I noticed that, when $n$ is even, $$(10^n+1)\mod11=2.$$

So

\begin{align*} &x(10^{2k}+1)\mod11=\left[(x\mod11)\cdot(\right(10^{2k}+1)\mod11)]\mod11=2x\!\!\!\!\!\mod11\\ &10y(10^{2k-2}+1)\mod11=\left[10\cdot y\cdot2\right]\mod 11=20y\mod11\\ \vdots \end{align*} so $$0\stackrel{?}{=}\left[2x\mod11+20y\mod11+200s\mod11+\cdots\right]\mod 11$$ Although I feel like this is leading me nowhere. Is this possible to show or is my initial assumption wrong?

Vepir
  • 12,516
DMH16
  • 1,517

2 Answers2

3

There's a well known trick that a number is divisible by $11$ if and only if the difference between the sum of its even place digits and the sum of its odd place digits is multiple of $11$ or $0$.

Even digitted palendromic numbers are a special case of this.

Let's prove this.

...

Let $n= \sum_{k=0}^m a_{k}10^k$

Now $10 \equiv -1\pmod {11}$ and so if $k$ is is even then $10^k -1\equiv 1-1\equiv 0 \pmod {11}$.

(It may, or may not, be worth noting that if $k$ is even then $10^k -1$ = $\underbrace{99}\underbrace{99}\underbrace{99}....\underbrace{99} = 99\times 10101010....01 = 9\times\color{red}{11}\times 1010101....01$.)

And if $k$ is odd then $10^k + 1\equiv (-1)+1 \equiv 0\pmod {11}$.

(Not as clear as the above but we could notice that if $k$ is odd then $10^k + 1 = 1000..... 01=\underbrace{99}\underbrace{99}\underbrace{99}....\underbrace{99}0 + 11 = 9\times\color{red}{11}(1010101....0101 + 1)$)

So that means for any $k$ that $a_{k+1}(10^k +1)$ is a multiple of eleven if $k+1$ is even. And $a_{k}(10^k -1)$ is a multiple of eleven if $k+1$ is odd, and that $a_{k}(10^k + (-1)^{k+1})$ is always a multiple of $11$.

Which means $\sum_{k=0}^m a_k(10^k+(-1)^{k+1})$ is a multiple of $11$ and therefore:

So $n= \sum_{k=0}^m a_{k}10^k$ is a multiple of $11$ if and only if:

$(\sum_{k=0}^m a_{k}10^k) - (\sum_{k=0}^ma_{k}(10^k + (-1)^{k+1}))$ is a multiple of $11$.

But

$(\sum_{k=0}^m a_{k}10^k) - (\sum_{k=0}^ma_{k}(10^k + (-1)^{k+1}))=$

$\sum_{k=0}^m (-1)^{k+1}a_{k}= \sum{\text{even digits} } -\sum \text{odd digits}$

So...... a number $n$ is a multiple of $11$ if and only if the sum of its even digits minus the sum of its odd digits is a multiple of $11$.

.... QED ... (sortof)

fleablood
  • 124,253
2

Your expression $$x\cdot10^{2k}+y\cdot10^{2k-1}+\cdots+y\cdot10+x$$ should be $$x\cdot10^{2k-1}+y\cdot10^{2k-2}+\cdots+y\cdot10+x\ .$$ Make this correction and use the same ideas and you will find that everything falls out easily.

David
  • 82,662