Find all pairs $(m, n)$ of nonnegative integers for which 
$$ m^{2}+2 \cdot 3^{n}=m\left(2^{n+1}-1\right) $$
(Australia) Answer. $(6,3),(9,3),(9,5),(54,5)$.
For fixed values of $n$, the equation (1) is a simple quadratic equation in $m$. For $n \leq 5$ the solutions are listed in the following table. 
| case | equation | discriminant | integer roots |
| :--- | :--- | :--- | :--- |
| $n=0$ | $m^{2}-m+2=0$ | -7 | none |
| $n=1$ | $m^{2}-3 m+6=0$ | -15 | none |
| $n=2$ | $m^{2}-7 m+18=0$ | -23 | none |
| $n=3$ | $m^{2}-15 m+54=0$ | 9 | $m=6$ and $m=9$ |
| $n=4$ | $m^{2}-31 m+162=0$ | 313 | none |
| $n=5$ | $m^{2}-63 m+486=0$ | $2025=45^{2}$ | $m=9$ and $m=54$ |

We prove that there is no solution for $n \geq 6$. Suppose that $(m, n)$ satisfies (1) and $n \geq 6$. Since $m \mid 2 \cdot 3^{n}=m\left(2^{n+1}-1\right)-m^{2}$, we have $m=3^{p}$ with some $0 \leq p \leq n$ or $m=2 \cdot 3^{q}$ with some $0 \leq q \leq n$.

In the first case, let $q=n-p$; then
$$
2^{n+1}-1=m+\frac{2 \cdot 3^{n}}{m}=3^{p}+2 \cdot 3^{q}
$$
In the second case let $p=n-q$. Then
$$
2^{n+1}-1=m+\frac{2 \cdot 3^{n}}{m}=2 \cdot 3^{q}+3^{p}
$$
Hence, in both cases we need to find the nonnegative integer solutions of
$$
3^{p}+2 \cdot 3^{q}=2^{n+1}-1, \quad p+q=n
$$
Next, we prove bounds for $p, q$. From (2) we get
$$
3^{p} < 2^{n+1} - 1 \quad \text{and} \quad 2 \cdot 3^{q} < 2^{n+1} - 1
$$
This implies
$$
3^{p} < 2^{n+1} - 1 \quad \text{and} \quad 3^{q} < \frac{2^{n+1} - 1}{2}
$$
Since $p+q=n$, we have $q=n-p$. Substituting $q$ in the second inequality, we get
$$
3^{n-p} < \frac{2^{n+1} - 1}{2}
$$
Taking logarithms, we have
$$
(n-p) \log 3 < \log \left( \frac{2^{n+1} - 1}{2} \right)
$$
Simplifying, we get
$$
(n-p) \log 3 < (n+1) \log 2 - \log 2
$$
$$
(n-p) \log 3 < n \log 2
$$
$$
n \log 3 - p \log 3 < n \log 2
$$
$$
n (\log 3 - \log 2) < p \log 3
$$
$$
n \log \left( \frac{3}{2} \right) < p \log 3
$$
$$
p > \frac{n \log \left( \frac{3}{2} \right)}{\log 3}
$$
Since $\log \left( \frac{3}{2} \right) \approx 0.1761$ and $\log 3 \approx 0.4771$, we have
$$
p > \frac{n \cdot 0.1761}{0.4771} \approx \frac{n \cdot 0.369}{1} \approx \frac{n-2}{3}
$$
In particular, we have $p > \frac{n-2}{3}$; in particular, we have $h > 1$. On the left-hand side of (2), both terms are divisible by $3^{h}$, therefore $9 \mid 3^{h} \mid 2^{n+1}-1$. It is easy to check that $\operatorname{ord}_{9}(2)=6$, so $9 \mid 2^{n+1}-1$ if and only if $6 \mid n+1$. Therefore, $n+1=6r$ for some positive integer $r$, and we can write
$$
2^{n+1}-1=4^{3r}-1=\left(4^{2r}+4^{r}+1\right)\left(2^{r}-1\right)\left(2^{r}+1\right)
$$
Notice that the factor $4^{2r}+4^{r}+1=\left(4^{r}-1\right)^{2}+3 \cdot 4^{r}$ is divisible by 3, but it is never divisible by 9. The other two factors in (4), $2^{r}-1$ and $2^{r}+1$ are coprime: both are odd and their difference is 2. Since the whole product is divisible by $3^{h}$, we have either $3^{h-1} \mid 2^{r}-1$ or $3^{h-1} \mid 2^{r}+1$. In any case, we have $3^{h-1} \leq 2^{r}+1$. Then
$$
\begin{gathered}
3^{h-1} \leq 2^{r}+1 \leq 3^{r}=3^{\frac{n+1}{6}} \\
\frac{n-2}{3}-1 < h-1 \leq \frac{n+1}{6} \\
n < 11
\end{gathered}
$$
But this is impossible since we assumed $n \geq 6$, and we proved $6 \mid n+1$.