I'm assuming you mean

is a positive integer and

is an integer.
(The sum

is ambiguous when x is not a positive integer,
and if

is allowed to be a real then

are the solutions)
Assuming

and

are positive integers the solution is given below.
If

, then


can always be written in the form

for some integer

and

(simply divide

by

, and take the quotient as

and the remainder as

).
This means

. No value of

gives

, so

when

.
When

, there are two solutions

and

respectively.
R. Baber.