Strange Bank Account 2
There are many different ways of ending up with £5 by cancelling: for example…
(2 x £6) + (1 x -£7) = £5
or
(9 x £6) + (7 x -£7) = £5
or
(16 x £6) + (13 x -£7) =£5
or
(23 x £6) + (19 x -£7) = £5
or
(30 x £6) + (25 x -£7) = £5
It could be written as £6n + -£7y = £5
n = 7n-5
y = 6n-5
Other ways of solving the problem are:
£5n + -£10y 4 + +£2 + 1 x (-£3) 7 x +£2 + 3 x (-£3)
n = 2n+1
y = 1y
You can find a solution if one of the y = 2n. However, that is not the only way to find the answer. The bigger number can be on either side, but the equation would be different.
It can’t work if Y and N were both equal or both odd.
In conclusion, I think that the number of ways to solve this problem is infinite, but doesn’t work with every set of numbers. If the whole equation was multiplied by X, it could work for any multiple of 5.
Deposits (+£2) Withdrawals (−£3) Calculation Outcome
N Y
4 1 4×(+£2)+1×(−£3) +£5
7 3 7×(+£2)+3×(−£3) +£5
10 5 10×(+£2)+5×(−£3) +£5
This table could go on forever if N = 3n +1
Y = 2n-1
This means that the next one will be 13 x (+£2) + 5 x (-£3)
The 50th one will be 151 x (+£2) + 49 x (-£3)