This is a question from the PRMO-2013.
Let Akbar and Birbal have $n$ marbles, where $n>0$.
Akbar says to Birbal, "If I give you some marbles you will have twice as many as I will have." Birbal says to Akbar, "If I give you some marbles you will have thrice as many as I will have."
What is the minimum possible value of $n$ for which the above statements are true?
My attempt:
Let Akbar have $a$ marbles, and Birbal $b$.
Akbar gives Birbal $f$ marbles, and then Birbal has twice as many has Akbar. So,
$2(a-f)=b+f$
Birbal gives Akbar $s$ marbles, and then Akbar has thrice as many as Birbal. So,
$a+s=3(b-s)$
Solving gives
$a=\frac{4s-9f}5,b=\frac{8s-3f}5$.
Since both are integers,
$5\mid4s-9f$ and $5\mid 8s-3f$.
Therefore $5\mid(s-f)$.
Since we want to minimize, take $f=0$ and $s=5$.
This gives $a=4,b=8$. Therefore $a+b=12$.
A solution given online:
Ans:
Hint: will be the LCM of 3 and 4.
Solution: A straightforward problem on the concept of Least Common Multiple.
I am unable to understand why they applied LCM, or where they got the $4$ from.
Please help.
Suppose Akbar gives Birbal some marbles leaving Akbar with $k$ marble and Birbal with $2k$ marbles. This implies that $n=k+2k$ for some integer $k$, i.e. $n$, is divisible by $3$.
Similarly, after Birbal gives Akbar some marbles leaving Birbal with $m$ marbles and Akbar with $3m$ marbles, we have that $n=m+3m=4m$ for some integer $m$, i.e.$n$, is divisible by $4$.