dheetCoder's blog

By dheetCoder, history, 14 months ago, In English

My grandfather ask me this puzzle problem.

Three friends were traveling together and one night they made some "littis" and went to sleep without eating any "littis". During the night, one of the friends woke up and divided the "littis" into three equal parts, with one extra "litti" left over. He gave the extra "litti" to the dog and ate his one out of three part and he went back to sleep. After some time, another friend woke up and he also divided the "littis" into three equal parts, with one "litti" left over. He gave the extra "litti" to the dog, ate his one part, and went back to sleep. The third friend woke up and did the same thing. In the morning, all three friends woke up and divided the remaining "littis" into three equal parts, with one left over. They ate their parts, and gave the extra "litti" to the dog. Finally, no "littis" were left. Can you guess how many "littis" there were originally?

Litti

I have tried bruteforce on number of littis and found the number as sequence of 79,160,241…

Can someone proof how this patterns of number is following ??

  • Vote: I like it
  • +16
  • Vote: I do not like it

| Write comment?
»
14 months ago, # |
  Vote: I like it +1 Vote: I do not like it

first, let me make sure i understand the problem. let the orignal number be X. then it should statisfy X=3a+1(because of the first friend divide and eat), and then 2a=3b+1(second friend), and then 2b=3c+1(third friend), and finally 2c=3d+1(all together) where a,b,c,d are some positive integer.

if we consider the 3-base number, a number can be written in the form of 3k+1 iff the least bit of it is 1. and on the other hand, consider the carries, a number times 2 can be written in the form of 3k+1 iff the least bit of it is 2. (2*2%3==1)

so back to the problem, we can construct the mininum answer, which should be $$$(2221)_3$$$, that is $$$(79)_{10}$$$.

and after that, to obtain other valid answers, we just need to keep this structure and add on $$$(10000)_3=(81)_{10}$$$ every time, so this will yield a arithmetic progression which is exatly 79,160,241,322,403,484....