How may ordered pair of positive integers satisfy the condition p+q+12=pq

I can only think of 2 and 14 which work

and here is why ...

pq - q = p+12
q(p - 1) = (p+12)
q = (p+12)/(p-1)
= 1 + 13/(p-1)

clearly p > 1 , to have positive values
for q to be an integer, 13/(p-1) has to be an integer, that is,
p has to be either 2 or 14

so (2,14) or (14,2)

e.g.
if p = 2, q = 14 , Steve's answer
if p=3, q= 15/2 = 7 + 1/2 , not an integer
if p = 4, q=16/3 = 5 + 1/3 , not an integer
if p=5, q = 17/4 = 4 + 1/4 , not an integer
if p=6, q= 18/5 = 3 + 1/5 , not an integer
..
if p= 20 , q = 32/19 , not an integer
...
etc

Thankyou

To find the number of ordered pairs of positive integers (p, q) that satisfy the equation p + q + 12 = pq, we can use the following steps:

Step 1: Rearrange the equation to isolate one variable.
Subtract 12 from both sides of the equation:
p + q - pq = -12

Step 2: Apply a quadratic formula.
Rearrange the equation further:
pq - p - q = 12
p(q - 1) - (q - 1) = 12
(p - 1)(q - 1) = 12

Step 3: Find all the pairs of factors of 12.
The factors of 12 are: 1, 2, 3, 4, 6, and 12. We can list all the pairs of factors:

(1, 12), (2, 6), (3, 4), (4, 3), (6, 2), (12, 1)

Step 4: Solve for p and q.
For each pair of factors, add 1 to each factor and substitute them into the equation (p - 1)(q - 1) = 12 to solve for p and q.

For (1, 12): p = 2, q = 13
For (2, 6): p = 3, q = 7
For (3, 4): p = 4, q = 5
For (4, 3): No positive integers satisfy the condition.
For (6, 2): No positive integers satisfy the condition.
For (12, 1): No positive integers satisfy the condition.

Step 5: Count the valid pairs.
From the solutions obtained in Step 4, we see that there are 3 valid ordered pairs of positive integers that satisfy the condition: (2, 13), (3, 7), and (4, 5).

Therefore, there are exactly 3 ordered pairs of positive integers that satisfy the equation p + q + 12 = pq.