## Alan and Bob’s cash

Posted by Chris on August 29, 2014 – 6:09 pm

Alan and Bob have a whole number of dollars. Alan says to Bob, “If you give me $3, I will have n times as much as you”. Bob says to Alan, “If you give me $n, I will have 3 times as much as you”.

If n is a positive integer, what are its possible values?

August 31st, 2014 at 12:15 am

The only possible value of n turns out to be 7.

August 31st, 2014 at 12:25 am

The only possible value of n turns out to be 1.

August 31st, 2014 at 9:35 am

Hi Sumit. That’s two of the four possible values.

September 1st, 2014 at 12:59 am

Hello Chris. According to the condition above of n being a positive integer, I think n = 1. The other three values I cannot think of them. And apologies, the post with n = 7 was my mistake.

September 1st, 2014 at 5:19 am

Hi Sumit. Unfortunately this site has a moderation policy. So neither of your posts appeared until I approved them. Despite your wording, in fact both 1 and 7 are correct. There are two more solutions.

If we relax n (and the initial values) being positive, then there are a further four solutions.

September 1st, 2014 at 6:39 am

starting with:

a+3=n*(b-3)

b+n=3*(a-n)

From this i conclude that the following must be satisfied:

n=(b+9)/(3*b-13)

since n and b are integers the only solution i can find are:

a=5, b=11, n=1

a=5, b=7, n=2

a=6, b=6, n=3

a=11, b=5, n=7

September 1st, 2014 at 7:47 am

Hi Jan, nicely done, that’s the solution set I was after.

Because n ≥ 1, trying n = 1 => b+9 = 3b – 13 => b = 11.

If try b = 12, we get 21/23 < 1, so b ≤ 11.

For 3b – 13 > 0, we have b > 13/3 => b ≥ 5.

It happens that b = 5 => n = 7. For the rest we only need to try b = 6,7,8,9 and 10. So that could be worse.

It happens that n = (b+9)/(2b -13), after some work, can be rewritten as

(3n – 1)(3b – 13) = 40 = 1*40 = 2*20 = 4*10 = 8*5

Hence 3n -1 = 1,2,4,5,8,10,20,40 are candidates. The rest is straightforward. Sadly that methodical approach seems to involve more labour that Jan’s approach.

If allow any integers, then (n,a,b) =

(0,-3,-9), (-1,-1,1), (-3,-3,3), (-13,-16,4) also works.