I'm going in circles with this question. As I don't know how to deal with the fact that the independent term is unknown. Typically when solving a quadratic equation you know the terms or they can be expressed as letters. But here I don't know how to find the number requested. Can somebody help me?

The problem is as follows:

If $n$ is a positive integer less than $100$, how many values can $n$ have so that the equation $x^2+x-n=0$ has two roots which are integers and different?

The alternatives found in my book are as follows:

$\begin{array}{ll} 1.&8\\ 2.&10\\ 3.&12\\ 4.&6\\ 5.&9\\ \end{array}$

In my attempt to solve the problem I tried what it was obvious and was calling the solution of the quadratic equation using the discriminant as follows:

Given the function:



However I'm stuck at the part where it mentions an integer less than $100$.

For this to happen the value on the numerator must be divisible by $2$. So the sum has to end in either $2,4,6,8,0$.

Since it is -1 when summed the square root result must end with those numbers and when subtracted from the square root must also end with those numbers.

It just happens that positive uneven numbers when summed to $-1$ will return an even number hence becoming divisible by $2$ and when subtracted to $-1$ will increase to an even number.

Therefore the result of the square root must be an uneven number. After I found this fact, I had to consider what values less than $100$ would also yield the same. $99\times 4 +1 = 397$ which is a number with no integer as square root, but gives us the idea that the number I'm looking for is of three digits and less than the square root of $397$.

The greatest uneven number which can happen before that number could be $19$ as $19^{2}=367$ but I found that there is no way to attain that number as $18$ is not divisible by $4$. So I kept searching. The next one $17$ yields $16$ so this can be a number, the next one $15$ doesn't, $13$ checks, $9$ also checks, $5$ is the final choice.

So from this I've found that the possible numbers would be:



$13^{2}=1+4n$ $n_{2}=\frac{168}{4}=42$

$9^{2}=1+4n$ $n_{3}=\frac{80}{4}=20$

$5^{2}=1+4n$ $n_{4}=\frac{24}{4}=6$

So there are only four possibilities. These produces different roots and integers.

$x_{1}=\frac{-1\pm \sqrt{289}}{2}=\frac{-1+17}{2}=8$


This would also happen with the rest. However this answer is not within the alternatives. Could it be that I overlooked any possible solutions?. Can somebody help me with this problem?.

  • $\begingroup$ $19^2=36\mathbf 1 = 1+4\times 90$ $\endgroup$ Feb 25, 2019 at 23:15
  • $\begingroup$ $15^2=225=1+4\times 56$, similar for $11^2,$ $7^2$, and $3^2,$ which you didn't include $\endgroup$ Feb 25, 2019 at 23:17
  • $\begingroup$ @J. W. Tanner That's right I ommitted those due I thought that should subtract what is inside the squared quantity, let's say $11$, $7$, $3$, since when I thought to subtract these from $1$ didn't produced a number divisible by $4$ and what I should have done was to look the result of that number to the power of two. $\endgroup$ Feb 26, 2019 at 15:50

2 Answers 2


As you said, $$x_{1,2}=\frac{-1\pm\sqrt{1+4n}}{2}$$ must be integers and $n<100$. This means ${4n+1}$ must be an odd square $(9,25,49,...).$

Therefore there are $9$ possibilities for $n<100$: $2,6,12,20,30,42,56,72,$ and $ 90.$

  • $\begingroup$ The reason why I missed some of the solutions was due the fact that I ommitted some of the odd squares, but it turns out that in my reasoning I wasn't that far of from the answer. $\endgroup$ Feb 26, 2019 at 15:47
  • $\begingroup$ Right; I tried to take your approach and show it worked $\endgroup$ Feb 26, 2019 at 16:10

Write $x^2+x-n=(x-r)(x-s)$ for some integers $r,s$.

Then $r+s=-1$ and $rs=-n$. The second expression implies that $r$ and $s$ have opposite signs, so without loss of generality assume $r>0$ and $s<0$. Observe that $n=r(-s)=r(r+1)$.

There are only $9$ ways that an integer between $0$ and $100$ can be factored as $r$ and $r+1$, namely, $1\cdot 2$, $2\cdot 3$, $\ldots,$ $8\cdot 9$, $9\cdot 10$.

  • $\begingroup$ of course I missed that. $\endgroup$
    – chhro
    Feb 25, 2019 at 23:07
  • $\begingroup$ correct, I edited it. I was under the impression that $r$ has to be a units digit, but no. $\endgroup$
    – chhro
    Feb 25, 2019 at 23:10
  • $\begingroup$ Interesting and elegant approach to the problem. But why did you chose $\left(x-r\right)\left(x-s\right)$ and not $\left(x+r\right)\left(x+s\right)$ or lets say $\left(x-r\right)\left(x+s\right)$ or $\left(x+r\right)\left(x-s\right)$?. Among all those possibilities you chose the one with two negatives in front of the variables, why?. This is the part where I'm stuck at. $\endgroup$ Feb 26, 2019 at 15:46
  • $\begingroup$ I tried to look for a reason trying to "factorize" those but since there is a negative in front of $n$ I couldn't find a justification of it, the only logical choice would be one to be negative and the other to be positve so $n$ is negative. Can you help me?. Why exactly did you chose $\left(x-r\right)\left(x-s\right)$ and not the other choices which I mentioned in my previous comment? $\endgroup$ Feb 26, 2019 at 15:52
  • $\begingroup$ $r$ and $s$ are roots of $(x-r)(x-s)$ $\endgroup$ Feb 26, 2019 at 16:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.