# Find all pairs of odd integers a and b that satisfy the following equation : a + 128b = 3abPls give me the simplest answer you can !

*print*Print*list*Cite

Let's say we have integers a and b that solve `a+128b=3ab` or `-3ab+a+128b=0`

If we had an equation, and it included `-3ab+a+128b` we could replace that with `0` to get a simpler equation:

Try foiling: `(-3a+128)(3b-1)`

`(-3a+128)(3b-1)`

`= -9ab+3a+384b-128`

`=3(-3ab+a+128b)-128`

`=3(0)-128`

So we have:

`(-3a+128)(3b-1) = -128`

The left hand side is a product, so we want to look at all the ways that you could multiply two numbers and get -128:

1*-128, -1*128, 2*-64, -2*64, 4*-32, -4*32, 16*-16

So our possibilities are: 1,-1,2,-2,-4,4,-8,8-,16,-16

We are told that `a` is odd:

So `-3a` is also odd (an odd times an odd is an odd)

and `-3a+128` is also odd (an odd plus an even is an odd)

So `-3a+128` is an odd number, and it divides 128. The only possibilities are that `-3a+128=1` and `-3a+128=-1`

If `-3a+128=1`, then `-3a=-127` and `a=42.3333...`

Then `a` is not an integer, and so this is not a solution.

The other possibility is:

If `-3a+128=-1`, then `-3a=-129` and `a=43`

If `(-3a+128)=-1`, then `(3b-1)=128` so:

`3b-1=128`

`3b=129`

`b=43`

So we must have `a=43`, `b=43`

Finally, where did that `(-3a+128)(3b-1)` come from?

We start with `a-3ab+128b=0`

We want to write this as a product, so:

`(a + ?)(b+?)`

We want to multiply b by 128, so:

`(a + 128)(b+?)`

We want to multiply ab by -3, so:

`(-3a + 128)(b+?)`

We want to multiply a by 1, and right now there is a -3 by the a, so to compensate for that, we need to multiply the a term by -1/3

`(-3a + 128)(b-(1)/(3))`

This gives us:

`(-3a + 128)(b-(1)/(3))`

Since we will be working with integers, it is easier to turn that last term into (3b-1)

( )( )