# Solution 1 (Sequence): Monkeys & Coconuts

Monkeys & Coconuts Problem

Solution 1 : iteration problem => Use sequence
$U_{j} =\frac {4}{5} U_{j- 1} -1$

(initial coconuts)
$U_0 =k$
Let
$f(x)=\frac{4}{5}(x-1)=\frac{4}{5}(x+4)-4$
$U_1 =f(U_0)=f(k)= \frac{4}{5}(k+4)-4$

$U_2 =f(U_1)=f(\frac{4}{5}(k+4)-4)= \frac{4}{5}((\frac{4}{5}(k+4)-4+4)-4$

$U_2=(\frac{4}{5})^2 (k+4)-4$

$U_3=(\frac{4}{5})^3 (k+4)-4$

$U_4=(\frac{4}{5})^4 (k+4)-4$

$U_5=(\frac{4}{5})^5 (k+4)-4$

Since
$U_5$ is integer  ,
$5^5 divides (k+4)$
k+4 ≡ 0 mod($5^5$)
k≡-4 mod($5^5$)
Minimum {k} = $5^5 -4$= 3121 [QED]

Note: The solution was given by Paul Richard Halmos (March 3, 1916 – October 2, 2006)