Monday, December 19, 2011

Mathematical Reflections 2011, Issue 5 - Problem J205

Problem:
Find the greatest $n$-digit number $a_1a_2\ldots a_n$ with the following properties:
i) all its digits are different from zero and distinct;
ii) for each $k = 2,\ldots,n-1$, $\dfrac{1}{a_{k-1}}, \dfrac{1}{a_k},\dfrac{1}{a_{k+1}}$ is either an arithmetic sequence or a geometric sequence.

Proposed by Titu Andreescu.

Solution:
The two properties imply that $1 \leq n \leq 9$, $1 \leq a_k \leq 9$, $a_i \neq a_j$ if $i \neq j$ and
$$\textrm{(i) } a_k(a_{k-1}+a_{k+1})=2a_{k-1}a_{k+1} \qquad \textrm{or} \qquad \textrm{(ii) } a_{k-1}a_{k+1}=a^2_k.$$
for each $k=2,\ldots,8$. We study each case separately.

(i) (a) $a_k=2,4,6,8$. We obtain the four equations
\begin{equation}\label{first}
a_{k+1}=a_{k-1}(a_{k+1}-1)
\end{equation}
\begin{equation}\label{second}
2a_{k+1}=a_{k-1}(a_{k+1}-2)
\end{equation}
\begin{equation}\label{third}
3a_{k+1}=a_{k-1}(a_{k+1}-3)
\end{equation}
\begin{equation}\label{fourth}
4a_{k+1}=a_{k-1}(a_{k+1}-4)
\end{equation}
The first has no solutions since $a_{k+1}-1$ can't divide $a_{k+1}$.
The second implies that $a_{k+1}-2$ divides $2a_{k+1}$ and since $2a_{k+1}=2(a_{k+1}-2)+4$, $a_{k+1}-2$ must divide $4$, i.e. $a_{k+1}=3,6$ and by symmetry $a_{k-1}=6,3$ respectively.
The third implies that $a_{k+1}-3$ divides $3a_{k+1}$ and since $3a_{k+1}=3(a_{k+1}-3)+9$, $a_{k+1}-3$ must divide $9$, so $a_{k+1}=4,6$ and $a_{k-1}=12,6$ respectively, so there are no solutions.
The fourth implies that $a_{k+1}-4$ divides $4a_{k+1}$ and since $4a_{k+1}=4(a_{k+1}-4)+16$, $a_{k+1}-4$ must divide $16$, so $a_{k+1}=5,6,8$ and $a_{k-1}=20,12,8$ respectively, so there are no solutions.

(b) $a_{k-1}+a_{k+1}=8,10,12$. (we can immediately discard $a_{k-1}+a_{k+1}=4,6,14,16$ because for any $a_{k-1},a_{k+1}$ the LHS would be divisible by $3$, by $4$ or by $7$ and the RHS not). We obtain
\begin{equation}\label{fifth}
a_{k-1}+a_{k+1}=8, \qquad 4a_k=a_{k-1}a_{k+1}
\end{equation}
\begin{equation}\label{sixth}
a_{k-1}+a_{k+1}=10, \qquad 5a_k=a_{k-1}a_{k+1}
\end{equation}
\begin{equation}\label{seventh}
a_{k-1}+a_{k+1}=12, \qquad 6a_k=a_{k-1}a_{k+1}
\end{equation}
The fifth implies that $a_{k-1}=6,2$ and by symmetry $a_{k+1}=2,6$ respectively, so $a_k=3$.
The sixth has no solutions since the LHS of the second equation is divisible by $5$ and the RHS not.
The seventh has no solutions since the LHS of the second equation is divisible by $6$ and the RHS not.

(ii) Since $a_{k-1} \neq a_{k+1}$, it is easy to see that the only solutions are
$$a_k=2, \qquad a_{k-1}=1,4, \qquad a_{k+1}=4,1$$
$$a_k=3, \qquad a_{k-1}=1,9, \qquad a_{k+1}=9,1$$
$$a_k=4, \qquad a_{k-1}=2,8, \qquad a_{k+1}=8,2$$
$$a_k=6, \qquad a_{k-1}=4,9, \qquad a_{k+1}=9,4.$$

In conclusion, we have the strings $$a_{k-1}a_k a_{k+1}=\{643,346,632,236,124,421,139,931,248,842,469,964\}.$$
Juxtaposing the strings, we see that the greatest number we can construct is $9643$.

No comments:

Post a Comment