Pair of Integers

Two numbers A , B A,B satisfy the equations { A B = p A + B = q \begin{cases} AB = p \\ A + B = q \end{cases} for integers p , q p, q .

Under what condition on p , q p,q are A A and B B also integers?


This problem is a variation on this one .

They are always integers p p is a perfect square p p and q q are coprime p q \sqrt{pq} is an integer p 2 + q 2 p^2 + q^2 is a perfect square q 2 4 p q^2 - 4p is a perfect square p p is odd and q q is even

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.

2 solutions

Arjen Vreugdenhil
May 29, 2018

A A and B B are the solutions of the quadratic equation x 2 q x + p = 0. x^2 - qx + p = 0. By the quadratic formula, A , B = q ± q 2 4 p 2 . A,B = \frac {q \pm \sqrt{q^2 - 4p}}2. If q 2 4 p q^2 - 4p is not a perfect square, this expression is irrational. If q 2 4 p q^2 - 4p is a perfect square, then q 2 4 p \sqrt{q^2 - 4p} has the same parity (odd/even) as q q , showing that the numerator is even; therefore A A and B B will be integers.

Zico Quintina
May 29, 2018

Arjen's solution is definitely the most efficient, but just as an alternative way to arrive at the same solutions for A A and B B :

A + B = q ( 1 ) A 2 + 2 A B + B 2 = q 2 A 2 2 A B + B 2 = q 2 4 p A B = ± q 2 4 p ( 2 ) A , B = q ± q 2 4 p 2 [by first adding (1) + (2), then subtracting (1) - (2)] \begin{aligned} A + B &= q \qquad &&(1) \\ \\ A^2 + 2AB + B^2 &= q^2 \\ \\ A^2 - 2AB + B^2 &= q^2 - 4p \\ \\ A - B &= \pm \sqrt{q^2 - 4p} \qquad &&(2) \\ \\ A,B &= \dfrac{q \pm \sqrt{q^2 - 4p} }{2} \qquad \qquad &&\small \text{[by first adding (1) + (2), then subtracting (1) - (2)]} \end{aligned}

and finishing like Arjen did.

the third line down should be + B 2 + B^2 , not B 2 - B^2

David Vreken - 3 years ago

Log in to reply

thanks for catching that, have made the correction.

zico quintina - 3 years ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...