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.
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.