Блог пользователя dheetCoder

Автор dheetCoder, история, 21 месяц назад, По-английски

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 ??

  • Проголосовать: нравится
  • +16
  • Проголосовать: не нравится

»
21 месяц назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

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....

  • »
    »
    21 месяц назад, # ^ |
    Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

    Yes. You have understood the problem correctly.Thank you for solution.This is mindblowing. You made my day.