Escolar Documentos
Profissional Documentos
Cultura Documentos
\
|
|
.
|
\
|
=
|
.
|
\
|
=
=
1 1
1
1
1
1
1
.
Take note that
m
m 1
is the proportion of the coconuts that was left after each sailor in
sequence took his share. So after the second sailor took his share, there were C
2
coconuts left,
where,
( )
n
m
m
n
m
m
C
m
m
C
n n
m
m
C
m
m
m
m
C
n C
m
m
C
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
=
(
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
=
|
.
|
\
|
=
1 1 1
1 1 1
1
2 2
2
2
1 2
After the third sailor took his share, there were C
3
coconuts left, where,
( )
n
m
m
n
m
m
n
m
m
C
m
m
C
n n
m
m
n
m
m
C
m
m
m
m
C
n C
m
m
C
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
=
(
(
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
=
|
.
|
\
|
=
1 1 1 1
1 1 1 1
1
2 3 3
3
2 2
3
2 3
After the fourth sailor took his share, there were C
4
coconuts left, where,
( )
n
m
m
n
m
m
n
m
m
n
m
m
C
m
m
C
n n
m
m
n
m
m
n
m
m
C
m
m
m
m
C
n C
m
m
C
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
=
(
(
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
=
|
.
|
\
|
=
1 1 1 1 1
1 1 1 1 1
1
2 3 4 4
4
2 3 3
4
3 4
After the fifth sailor took his share, there were C
5
coconuts left, where,
( )
n
m
m
n
m
m
n
m
m
n
m
m
n
m
m
C
m
m
C
n n
m
m
n
m
m
n
m
m
n
m
m
C
m
m
m
m
C
n C
m
m
C
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
=
(
(
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
=
|
.
|
\
|
=
1 1 1 1 1 1
1 1 1 1 1 1
1
2 3 4 5 5
5
2 3 4 4
5
4 5
Clearly, from the second term to the last term of the equations, they form a geometric
progression, where the common ratio r = |
.
|
\
|
m
m 1
. Thus, successive C
i
s can be generated.
terms
m m m
m
n
m
m
n
m
m
n
m
m
n
m
m
C
m
m
C
n
m
m
n
m
m
n
m
m
n
m
m
n
m
m
n
m
m
C
m
m
C
n
m
m
n
m
m
n
m
m
n
m
m
n
m
m
C
m
m
C
m
2 1
2 3 4 5 6 6
6
2 3 4 5 5
5
1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
=
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
=
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
=
In the morning, after m sailors kept their share, there were C
m
coconuts left. For the final
division, n coconuts were given to the monkey and each man got Y coconuts, where,
( )
( )
(
(
(
(
+
|
.
|
\
|
+
|
.
|
\
|
+ +
|
.
|
\
|
+
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
|
.
|
\
|
=
=
+
+
+
terms m
m m
m
m
terms m
m m m
m
m
m
m
m
m
m
m
m
m
n
m
C m
Y
n n
m
m
n
m
m
n
m
m
n
m
m
C
m
m
m
Y
n C
m
Y
) 1 (
2 1
1
) 1 (
2 1
1
1 1 1 1 1
1 1 1 1 1 1
1
Notice that the terms in the bracket is a geometric progression. It can be simplified as,
( )
( )
(
(
(
(
(
|
.
|
\
|
=
(
(
(
(
(
|
.
|
\
|
|
.
|
\
|
=
+
+
+
+
m
m
m
m
n
m
C m
Y
m
m
m
m
m
n
m
C m
Y
m
m
m
m
m
m
1
1
1
1
1
1
1
1
1
1
1
1
1
Further algebraic manipulation and clearing out fractions will yield to simple equation.
( )
( )
( ) ( )
( ) ( ) ( )
( ) ( ) ( ) 1 1
1 1
1 1
1 1
1
1
1
1
1 1
1
1
1
1
1
1
1
+ = +
+ = +
= +
|
.
|
\
|
+
=
(
(
|
.
|
\
|
=
+
+ +
+
+
+
+
+
+
+
m C m n Y m
m C m n Y m
m
m
m
C m
n Y
m
m
n n
m
C m
Y
m
m
n
m
C m
Y
m m
m m m
m
m
m
m
m
m
m
m
m
m
The resulting equation looks a lot simpler, but it still may not be clear how to make
progress. Since m and n are whole number constants, Y and C must be whole numbers also.
Clearly, there are infinite number of solutions. Solving for C in terms of m, notice that
1 + m
m does
not divide ( )
m
m 1 and vice versa. Thus,
1 + m
m must divide ( ) 1 + m C . By definition of
congruence, we have
( )
( )
1
1
mod 1
mod 0 1
+
+
+ ~
~ +
m
m
m m C
m m C
Solving for Y, we can apply the same principle. ( )
m
m 1 must divide ( ) n Y + . Thus,
( ) ( )
( ) ( )
m
m
m n Y
m n Y
1 mod
1 mod 0
~
~ +
In the original problem with m = 5 and n = 1, ( ) 15625 mod 4 ~ C and
( ) 1024 mod 1 ~ Y . The smallest positive solution to the problem is there are 15625 coconuts at
the beginning.