Originally Posted by

**matt12345** Hello

I have equation:

Equation has 2 solutions. p and q are integer and positive. How many different p and q exsist if both solutions are less then 5 (x1,x2<5).

Sorry for my English. Please help. Cheers.

I do not understand this (x1,x2<5).

Could you explain what that means in this situation?

Since p & q are integers, x must be greater than zero, and an integer.

Code:

x p q
1 1 0
1 2 1
1 3 2
1 4 3
2 2 0
2 3 2
2 4 4
3 4 3

That's eight solutions.

If you removed x=1, p=1, q=0 and x=2, p=2, q=0, you would still have 6 solutions.

Could you explain the restrictions so that only 2 work?