0

$\overline{ab}, \overline{ba}$ are numbers in base $10$.

$a,b=\;?$ if $\overline{ab}-\overline{ba} = a(b-1) $ and $a,b$ are primes and distinct.

I tried: $$\overline{ab}= 10a + b\;\text{ and }\;\overline{ba} = 10b + a$$ and I got this:

$$10(a-b) = b(a-1)$$ How can we find $a$ and $b$? (Primes and distinct $\Rightarrow a,b$ can be $3,5,7$)

Did
  • 279,727
Florin M.
  • 635

2 Answers2

1

For a positive integer $n$ let $\nu(n)$ be the number of digits in its decimal expansion. Then $$ \overline{a\,b}-\overline{b\,a}=a\,10^{\nu(b)}+b-b\,10^{\nu(a)}-a=a(10^{\nu(b)}-1)-b(10^{\nu(a)}-1). $$ If $a$ and $b$ are distinct primes and $\overline{a\,b}-\overline{b\,a}=a(b-1)$, then $a\mid10^{\nu(a)}-1=9\times\mathbf{1}_{\nu(a)}$, where $\mathbf{1}_{n}=1\dots1$ is a repunit. This implies hat the only possibilities for $a$ are $a=3$ or a prime repunit. If $a=3$ then $$ \overline{3\,b}-\overline{b\,3}=3\,10^{\nu(b)}+b-10\,b-3=3(b-1)\implies b=\frac{10^{\nu(b)}}{4} $$ and $b$ is not a prime integer.

Finally, if $a$ is a prime repunit, then it is easy to see that $\overline{a\,b}-\overline{b\,a}\le0$.

If we consider the equation $|\overline{a\,b}-\overline{b\,a}|=a(b-1)$, there are solutions with $a=3$ and $b=\dfrac{10^{\nu(b)}-2}{2}$, which is prime for $\nu(b)=3, 4, 5, 7, 15, 55,\dots$.

0

$\overline{ab}-\overline{ba}=a(b-1)$

$10(a-b)-(a-b) = a(b-1)$

$9(a-b)=a(b-1)$

$3\cdot 3 \cdot (a-b)=a\cdot (b-1)$

$a\geq2$ and $b\geq2$, so $a\cdot (b-1)>0$ and therefore $a>b$, b$\neq 7$.

if $3$ doesn't divide $a$, $3|(b-1)$, therefore $b=3k+1$.

but thats contradict that $b$ is either $2$ or $3$ or $5$.

so $3|a$, then $a=3$ and $b=2$.

but $3\cdot 3 \cdot 1\neq3\cdot 1$.

so there is no solution.

D. A.
  • 675