How many positive integers $n$ less than 100 have a corresponding integer $m$ divisible by 3 such that the roots of $x^2-nx+m=0$ are consecutive positive integers?

I'm thinking that this problem is Vieta's. Here's my reasoning. Let $a_1$ and $a_2$ be the roots of this polynomial. We have that $a_1+a_2=n$ and $a_1a_2=m$. We also have that $a_1+1=a_2$. We know that since $m$ is divisible by $3$, we have that $a_1$ or $a_2$ is divisible by $3$. In this case, we know that the other root will have to be even. We have that $n$ will be odd, and $m$ will be odd as well. Another key bit of information is that $n$ and $m$ are both integers. From here, I am not able to solve. Help is greatly appreciated.


3 Answers 3


Let the smallest solution be $a$. Then, by Vieta's, $m=a(a+1)$. Since m is divisible by 3, $a$ or $a+1$ is divisible by 3. This gives that $a$ can be $2$, $3$, $5$, $6$, etc. Remember that $n<100$, so $2a+1<100$, which gives $a<49.5$. This means that the largest value of $a$ is $48$. Note that for every multiple of $3$ $a$ is equal to, there is a value of $a$ one less than it. So the answer is the number of multiples from $3$ to $48$ times $2$, which is $16*2=\boxed{32}$. I am not sure that this is correct, so you may want to double check.


Vietas formulas gives us that $n$ is the sum of the roots. Let us call these roots $r$ and $r+1$.

We need $m$ divisible by $3$, and thus we need $3\mid r$ or $3\mid r + 1$.

So we need the amount of pairs $(1,2), (2,3), \cdots, (49, 50)$ such that the pair contains a multiple of $3$.

This is easier to complementary count: We count $(1,2), (4,5),\cdots,(49,50)$ whic is $17$ pairs without multiples of $3$. Thus we have $49 - 17 = 32$ pairs that satisfy our conditions.



If the roots are $a,a+1$

$m=a(a+1)\implies3|a(a +1)$

If $a=3b,$ we need $0<2(3b)+1<100$

What if $3|(a+1),a+1=3c$(say)

  • $\begingroup$ I have solved that $b$ can only reside in the interval $b<16.5$. Now what must I do? $\endgroup$ Feb 22, 2018 at 4:07
  • $\begingroup$ @Skupp, $b$ needs to be positive integer, right? $\endgroup$ Feb 22, 2018 at 4:08
  • $\begingroup$ Yes it does. Is the answer $16$? $\endgroup$ Feb 22, 2018 at 4:08
  • $\begingroup$ @Skupp, Consider $a=3c-1,c>0$ as well $\endgroup$ Feb 22, 2018 at 4:09
  • $\begingroup$ Is $c$ an integer? $\endgroup$ Feb 22, 2018 at 4:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .