$N$ such that $4N$ and $N$ are both 4-digits and $4N$ is the reverse of $N$

150 Views Asked by At

I've run into a very fun little problem.

You start out with a four digit number, $N$; you multiply it by 4 to get another $4$ digit number, $4N.$ $4N$ is the reverse of $N$ (i.e., $1234$ and $4321$). I managed to solve for $N,$ but was curious as to how other people approach this problem. If you have a purely logical solution, please let me know.

2

There are 2 best solutions below

0
On

I found only $2178$. Unfortunately NOT logic

Call $abcd$ the number where $a$ is thousands etc

$4 (1000 a+100 b+10 c+d)=a+10 b+100 c+1000 d$

which means

$3999 a+390 b-60 c-996 d=0$

$d=\dfrac{1}{332} (1333 a+130 b-20 c)$

Then by trial and error I found that $a=2;\;b=1;\;c=7$

0
On

Starting from the equation:

$$1333a+130b-20c-332d=0$$

We see that $3a\equiv 2d\pmod{10}$.

We also have $a=1,2$ or else $4N$ is not four digits. We also have $a$ is even, because it is the last digit of $4N$. So $a=2$.

Then $6\equiv 2d\pmod{10}$ is equivalent to $d\equiv 3\pmod{5}$, which means $d=3$ or $d=8$.

If $d=3$ then you need $2666-996=1670=20c-130b$ or $2c-13b=167$. But that isn't possible since $2c-13b<20$ when $0\leq b,c<10$.

So $d=8,a=2$ and you have $2666-332\cdot 8 = 10 = 20c-130b$ or $2c-13b=1$. With $0\leq c<10$ that gives only $c=7$ and $b=1$.

So $2178$ is the only solution.


If you allow $a=0$, then you have $d\equiv 0\pmod{5}$.

If $d=0$ then you want $13b=2c$ which is not possible.

If $d=5$ then you want $130b-2c=1660$ and thus $13b-2c=166$ which is not possible if $0\leq b.c<10$ since $13-2b<130$.

So, no other solution even if you allow $a=0$.


Without modular arithmetic, you can see that $a=2$ since we know that $a=1,2$ and $a$ is the last digit of $4N$, so $a$ must be even.

You also know that $a$ is the last digit of $4d$, which, by trial and error, we see $d=3$ or $d=8$.

The rest of the argument above is free of appeals to modular arithmetic.


Since $2178=99\cdot 22$, I'm wondering of there is any clever way we can get this, by writing:

$$4\cdot 0.\overline{abcd}=0.\overline{dcba}$$

Basically, $0.\overline{2178}=\frac{2178}{9999}=\frac{22}{101}$.

I don't have a complete solution for this approach, but here's a start.

If $x=0.\overline{abcd}$ and $y=0.\overline{dcba}$ in general, then:

$$1010x-101y$$ is an integer.

So is $1010y-101x$.

Basically, the fraction part of both $1010x$ and $101y$ is the fractional part of $\frac{b+d}{10}+\frac{a+c}{100}+\cdots.$

If you also have $4x=y$, then you have $1010y-101x=(4040-101)x=3939x$ is an integer, as is $1010x-404x=606x$. Subtracting, we get $(3939-6\cdot 606)x=303x$ is an integer.

So far, this just shows that $N$ is divisible by $33$, which isn't so much. That can deduced by certain digit divisibility rules, such as $N\equiv -a+b-c+d\pmod{11}$ and $4N\equiv a-b+c-d\pmod{11}$ means $5N$ is divisible by $11$ and hence $N$ is divisible by $11$.

Not sure where to go from here.