A tank contains a certain amount of water. Each month half of the water in the tank evaporates and an extra liter of water is added. After 5 months, after the litres of water is added, there were 4 litres of water in the tank. How many litres were in the tank originally?

If there were x liters to start, then we have the following table:

month water at end of month
0 x
1 x/2 + 1
2 (x/2 + 1)/2 + 1 = x/4 + 3/2
3 (x/4 + 3/2)/2 + 1 = x/8 + 7/4
...
n x/2^n + (2*2^n-2)/2^n = (x + 2*2^n-2)/2^n
So, at the end of the 5th month there were

(x+62)/32 = 4
x = 66

check:
0 66
1 34
2 18
3 10
4 6
5 4

To solve this problem, we can work backwards. Let's denote the original amount of water in the tank as "x" liters.

After the first month, half of the water evaporates, which leaves us with x/2 liters of water.

Then, an extra liter of water is added, which gives us (x/2) + 1 liters.

Following the same pattern, after the second month, we have ((x/2) + 1) / 2 liters of water.

After the third month, we have (((x/2) + 1) / 2) / 2 liters of water.

After the fourth month, we have ((((x/2) + 1) / 2) / 2) / 2 liters of water.

And finally, after the fifth month, we have (((((x/2) + 1) / 2) / 2) / 2) / 2 liters of water, which is given as 4 liters.

Now, let's write this equation and solve for x:

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

Simplifying the equation:

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

Multiplying both sides by 2^5 to get rid of the denominator:

(x/2) + 1 = 4 * 2^5

Simplifying further:

x/2 + 1 = 128

Subtracting 1 from both sides:

x/2 = 127

Multiplying both sides by 2 to isolate x:

x = 2 * 127

x = 254

Therefore, the original amount of water in the tank was 254 liters.