# A Problem from the 1967 IMO Shortlist

### Solution

For the $n^{\text{th}}\,$ term of the sequence, counting backwards, there are $n+1\,$ $1's;\,$ one $8;\,$ $n\,$ $7's;\,$ one $0\,$ and $n\,$ $1's.$

\displaystyle\begin{align} \underbrace{11\ldots 1}_{n+1}&=\frac{1}{9}\left(10^{n+1}-1\right)\\ 8\underbrace{11\ldots 1}_{n+1}&=8\cdot 10^{n+1}+\frac{1}{9}\left(10^{n+1}-1\right)\\ \underbrace{77\ldots 7}_{n}8\underbrace{11\ldots 1}_{n+1}&=\frac{7}{9}\left(10^{2n+2}-10^{n+2}\right)+8\cdot 10^{n+1}+\frac{1}{9}\left(10^{n+1}-1\right)\\ 0\underbrace{77\ldots 7}_{n}8\underbrace{11\ldots 1}_{n+1}&=0\cdot 10^{2n+2}+\frac{7}{9}\left(10^{2n+2}-10^{n+2}\right)+8\cdot 10^{n+1}\\ &\qquad\qquad+\frac{1}{9}\left(10^{n+1}-1\right)\\ \underbrace{11\ldots 1}_{n}0\underbrace{77\ldots 7}_{n}8\underbrace{11\ldots 1}_{n+1}&=\frac{1}{9}\left(10^{3n+3}-10^{2n+3}\right)+\frac{7}{9}\left(10^{2n+2}-10^{n+2}\right)\\ &\qquad\qquad+8\cdot 10^{n+1}+\frac{1}{9}\left(10^{n+1}-1\right)\\ \underbrace{11\ldots 1}_{n}0\underbrace{77\ldots 7}_{n}8\underbrace{11\ldots 1}_{n+1}&=\frac{1}{9}\left(10^{3n+3}-10^{2n+3}\right)+\frac{7}{9}\left(10^{2n+2}-10^{n+1}\right)\\ &\qquad\qquad+\frac{1}{9}\left(10^{n+2}-1\right)\\ \underbrace{11\ldots 1}_{n}0\underbrace{77\ldots 7}_{n}8\underbrace{11\ldots 1}_{n+1}&=\frac{1}{9}\left(10^{3n+3}-3\cdot 10^{2n+2}+3\cdot 10^{n+1}-1\right)\\ &=\frac{1}{9}(10^{n+1}-1)^3, \end{align}

so that $\displaystyle a_n=\left(\frac{10^{n+1}-1}{3}\right)^3.$

### Acknowledgment

I found this problem in IMO Compendium (1st edition, pp 41-42). The problem (proposed by Bulgaria) was shortlisted at the 9th IMO in 1967.