I have a equation like this:
$$84 = nx + (n-1)n$$
where, $x$ is odd.
I need to find the fastest way to find a possible $n$ and $x$.
(In this case: $n = 6, x = 9$)
Edit: Maybe the background helps: 84 is the distance between 2 square numbers (100 - 16)
We have $84=n(x+n-1)$, hence $n\mid 84$. A possibility is to go through the divisors of $84$ and check if $x$ is an odd integer. It is already, for $n=2$.
Edit: We can find all solutions, but if you only want "a possible $n$ and $x$", this is the fastest.