# Algebra and fractions

• May 16th 2012, 06:52 AM
ineedyourhelp
Algebra and fractions
Hi all, I came across this problem and its solution:

There are 5 people A-E. They have alot of oranges. First, A takes 1 orange from the basket, and 1/5 of the remaining. Next, B takes 1 orange, and 1/5 of the remainder again. And So on. What is the least number of oranges that they have?

Basically the solution is 5^5-4.

I came up with a general case whereby

There are n people. They have alot of oranges. First, A takes 1 orange from the basket, and 1/n of the remaining. Next, B takes 1 orange, and 1/n of the remainder again. And So on. What is the least number of oranges that they have?

And the solution should be n^n - (n-1)

I understand the n^n but as for the n-1, I couldn't figure out the logic in it. Could anyone help me with this?

(My apologies if this thread is in the wrong topic)
• May 18th 2012, 08:08 PM
CoffeeBird
Re: Algebra and fractions
i'm thinking on this...i'm new here so i don't quite know how to come back to your problem, but maybe i can trace it through this response. sorry i don't know what to tell you right now!
• May 19th 2012, 08:27 AM
Wilmer
Re: Algebra and fractions
What? No monkey to give an orange to?

Go here: The On-Line Encyclopedia of Integer Sequences™ (OEIS™)
enter sequence A006091

IF you can call this a "looper formula":
x = n^n - n + 1
DOWHILE (x-1) / n = INTEGER
x = x-1 : x = x - x/n

For similar problems, google "monkey and coconuts"