wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> easy >> Beer Seller
(Message started by: Marcello on Dec 4th, 2002, 12:28pm)

Title: Beer Seller
Post by Marcello on Dec 4th, 2002, 12:28pm
This is my first in this forum.Hope you like it!
There's a guy who has a number of beers.The first day he drinks one beer in the morning and sells the 1/4th of the remaining beers at the afternoon.The second day he drinks one beer in the morning and sells the 1/4th of the remaining ones at the afternoon.The same happens at the 3rd,the 4th,the 5th,the 6th and the 7th day.Considering that each day after selling the beers he has an integer number of them,what is the minimum number of beers he had at the beginning.Forgive me for my bad english.Hope you find the answer!!

//Thread title changed by Icarus to be more descriptive

Title: Re: Mathematic problem
Post by James Fingas on Dec 4th, 2002, 12:44pm
Marcello,

I have heard questions sort of like this before, but man, that's a lot of beer! :o Who does he sell them to? The entire Republican party?

Title: Re: Mathematic problem
Post by Speaker on Dec 5th, 2002, 12:36am
Here's my answer: 749,154,092,363,989
And, at the end of the week, he still has 100,000,000,000,000

I have a couple of notes on this answer. I didn't hide it for too reasons, first I don't know how, second I wouldn't want to hide an incorrect answer.

Also, I used a rather arcane method to arrive at this answer, it may be wrong, I can't prove otherwise. But James hint on it being enough to provide for the entire republican party set me on the right track.

Title: Re: Mathematic problem
Post by towr on Dec 5th, 2002, 8:07am
every intermediate number has to be a multiple of three, and divisible by 4 after you remove 1..

so if you only had to do it once, 1 would work
for twice 13 (goes to 9 goes to 6)
(meh, screw it, I'll go program something to solve it :P)

3: 61 45 33 24
4: 253 189 141 105 78
5: 1021 765 573 429 321 240

I'm sensing a pattern here.. The last number is the previous last number times 3 + 6 ..
Which is good enough to find the final answer (but then, where's the proof of correctness)

6: 4093 3069 2301 1725 1293 969 726

heh, of course the first number of each sequence is 22*n-3, much more usefull..

so the answer is 'just' 16381

if you take (3/4)7 you get  2187/16384
if you subtract 3 from the denominator you get the number you started out with, subtract 3 from the numerator and it's the number you're left with.. (and that's not just true for n=7, but also all former..and I'd guess all following)

Title: Re: Mathematic problem
Post by towr on Dec 5th, 2002, 9:11am
It seems that for any natural number sequence xi with 0<= i <=n for which
(xj-1 -1)*a/(a+1)=xj (where a is also a natural number)
the lowest you can get is:
x0 = (a+1)n-a and xn = an-a

Title: Re: Mathematic problem
Post by James Fingas on Dec 5th, 2002, 9:20am
Speaker,

I don't think that even the Republican party can drink 100 trillion beers.



Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board