Two numbers A , B satisfy the equations { A B = p A + B = q for integers p , q .
Under what condition on p , q are A and B also integers?
This problem is a variation on this one .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Arjen's solution is definitely the most efficient, but just as an alternative way to arrive at the same solutions for A and B :
A + B A 2 + 2 A B + B 2 A 2 − 2 A B + B 2 A − B A , B = q = q 2 = q 2 − 4 p = ± q 2 − 4 p = 2 q ± q 2 − 4 p ( 1 ) ( 2 ) [by first adding (1) + (2), then subtracting (1) - (2)]
and finishing like Arjen did.
the third line down should be + B 2 , not − B 2
Problem Loading...
Note Loading...
Set Loading...
A and B are the solutions of the quadratic equation x 2 − q x + p = 0 . By the quadratic formula, A , B = 2 q ± q 2 − 4 p . If q 2 − 4 p is not a perfect square, this expression is irrational. If q 2 − 4 p is a perfect square, then q 2 − 4 p has the same parity (odd/even) as q , showing that the numerator is even; therefore A and B will be integers.