Sam has a bag full of marbles.

He takes out half of the marbles present in the bag and puts back one marble into the bag. He repeats this process four times. In the end only three marbles are left in the bag.
How many marbles were there in the bag original

start with x marbles

step 1: marbles in bag = x/2 + 1
step 2: marbles in bag = (1/2)(x/2) + 1) + 1
= x/4 + 3/2
step 3: marbles in bag = (1/2)(x/4+3/2) + 1
= x/8 + 3/4 + 1 = x/8 + 7/4
step 4: marbles in bag = (1/2)(x/8 + 7/4) + 1
= x/16 + 7/8 + 1
= x/16 + 15/8

x/16 + 15/8 = 3
multiply by 16
x + 30 = 48
x =18

To determine the original number of marbles in the bag, we can work backwards using the information given.

Let's denote the original number of marbles in the bag as "x".

According to the question, Sam takes out half of the marbles from the bag and puts back one marble each time.

After the first round, Sam removes half of the marbles, so there are x/2 marbles left in the bag. However, one marble is added, so the total number of marbles in the bag becomes (x/2) + 1.

This process is repeated four times, so after the fourth round, the number of marbles in the bag would be:

(((((x/2) + 1)/2) + 1)/2) + 1

Simplifying this expression step by step:

(((((x/2) + 1)/2) + 1)/2) + 1
= ((((x/2) + 1)/2) + 1)/2 + 1
= (((x/2)/2) + 1/2) + 1/2 + 1
= (x/4) + 1/2 + 1/2 + 1
= (x/4) + 3/2 + 1
= (x/4) + (3/2) + (2/2)
= (x/4) + 5/2

We are also given that in the end, there are only three marbles left in the bag. Therefore, we can equate the expression above to 3:

(x/4) + 5/2 = 3

Multiplying both sides of the equation by 4, we have:

x + 10 = 12

Subtracting 10 from both sides:

x = 2

Therefore, the original number of marbles in the bag was 2.