2006 Cyprus MO/Lyceum/Problem 12

Problem

If $f(\alpha,\beta)= \begin{cases}\alpha & \textrm {if} \qquad \alpha=\beta \\ f(\alpha-\beta,\beta) & \textrm {if} \qquad \alpha>\beta \\ f(\beta-\alpha,\alpha) & \textrm {if} \qquad \alpha<\beta \end{cases}$

then $f(28,17)$ equals

$\mathrm{(A)}\ 8\qquad\mathrm{(B)}\ 0\qquad\mathrm{(C)}\ 11\qquad\mathrm{(D)}\ 5\qquad\mathrm{(E)}\ 1$

Solution

\begin{align*} f(28,17)&=f(11,17)\\  &=f(6,11)\\  &=f(5,6)\\  &=f(1,5)\\ &=f(4,1)\\  &=f(3,1)\\  &=f(2,1)\\  &=f(1,1)\\  &=1 & \text{Thus the answer is}\mathrm{(E)} \end{align*}

See also

2006 Cyprus MO, Lyceum (Problems)
Preceded by
Problem 11
Followed by
Problem 13
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30