Problem 12.4. Let $O$ be the circumcenter of a triangle $A B C$ with $A C=B C$. The line $A O$ meets the side $B C$ at $D$. If the lengths of $B D$ and $C D$ are integers, and $A O-C D$ is a prime number, find these three numbers.

Nikolai Nikolov
12.4. Set $A O=R, B D=b, C D=c$ and $O D=d$. Since $C O$ is the bisector of $\Varangle A C D$, then

$$
\frac{d}{R}=\frac{c}{b+c}
$$

Let the line $A O$ meet the circumcircle of $\triangle A B C$ at $E$. Then $A D \cdot D O=$ $B D . C D$, i.e.

$$
(R+d)(R-d)=b c
$$

Since $d=\frac{c R}{b+c}$, it follows that $R^{2}=\frac{(b+c)^{2} c}{b+2 c}$. Set $k=(b, c, R), m=$ $\left(\frac{b}{k}, \frac{c}{k}\right), R_{1}=\frac{R}{k}, b_{1}=\frac{b}{k m}$ and $c_{1}=\frac{c}{k m}$. Then

$$
R_{1}^{2}=\frac{m^{2}\left(b_{1}+c_{1}\right)^{2} c_{1}}{b_{1}+2 c_{1}}
$$

Since $\left(m, R_{1}\right)=1$ and $\left(b_{1}+2 c_{1}, b_{1}+c_{1}\right)=\left(b_{1}+2 c_{1}, c_{1}\right)=\left(b_{1}, c_{1}\right)=1$, we get $R_{1}^{2}=\left(b_{1}+c_{1}\right)^{2} c_{1}$ and $m^{2}=b_{1}+2 c_{1}$. Hence $c_{1}$ is a perfect square, say $c_{1}=n^{2}$. Now $c=k m c_{1}=k m n^{2}, b=k m b_{1}=k m\left(m^{2}-2 n^{2}\right)$ and $R=k R_{1}=k n\left(m^{2}-n^{2}\right)$.

The inequality $1>\sin \Varangle B A C=\frac{b+c}{2 R}=\frac{m}{2 n}$ shows that $\sqrt{2} n<m<2 n$. (Conversely, this condition implies that such a $\triangle A B C$ exists, it is acute and the line $A O$ meets the side $B C$.) In particular, $n \geq 2$.

Since $R-c=k n\left(m^{2}-n^{2}-m n\right)$ is a prime number, it follows that $n$ is a prime number, $k=1$ and $m^{2}-n^{2}-m n=1$, i.e. $(m-1)(m+1)=n(m+n)$. Hence $n$ divides either $m-1$ or $m+1$.

1) Let $m-1=\ln$. Then $l(\ln +2)=\ln +1+n$, i.e.

$$
n=\frac{1-2 l}{l^{2}-l-1}
$$

Since $n<0$ for $l \geq 2$ we get $l=1$ and $n=1$, a contradiction.

2) Let $m+1=\ln$. Then $l(\ln -2)=\ln -1+n$, i.e.

$$
n=\frac{2 l-1}{l^{2}-l-1}
$$

Since $n \leq 1$ for $l \geq 3$ and $n=-1$ for $l=1$ we get $l=2$. Then $n=R-c=$ $3, m=5, b=35$ and $c=45$.