TITLE: Find the sum of all odd numbers between two polynomials
QUESTION [5 upvotes]: I was asked this question by someone I tutor and was stumped.
Find the sum of all odd numbers between $n^2 - 5n + 6$ and $n^2 + n$ for $n \ge 4.$
I wrote a few cases out and tried to find a pattern, but was unsuccessful.
Call polynomial 1, $p(n) = n^2 - 5n + 6,$ then $p(4)=2.$  Next, call polynomial 2, $q(n)=n^2 + n,$ then $q(4)=20.$  Then adding all the odd numbers between 2 and 20 gives the following sum:
$3+5+7+9+11+13+15+17+19= 99. \\$
$p(5)= 6$ and $q(5)=30.$ Then adding all the odd numbers between 6 and 30 gives the following sum:  $7+9+11+13+15+17+19+21+23+25+27+29=216 \\$
$p(6)=12$ and $q(6)= 42.$  Then adding all the odd numbers between 12 and 42 give the following sum:  $13+15+17+19+21+23+25+27+29+31+33+35+37+39+41 = 405.$
From here I do not see any apparent patters.  This problem was given in a Pre-Calculus course, so clearly only elementary methods are expected by the students.  
Any help or advice would be much appreciated.  Thank you!!!!!

REPLY [4 votes]: @Elaqqad gave a very elegant answer, so I'll try to give the "especially pre-calc accessible" answer, exploiting the fact that we have an arithmetic series.
Note $p(n) = n^2 - 5n + 6 = (n-3)(n-2)$, while $q(n) = n^2 + n = n(n+1)$, with $p(n) < q(n)$. 
Now, $p(n)$ and $q(n)$ are both even, so that we're adding up odd numbers from $p(n)+1 = n^2 - 5n + 7$ to $q(n)-1 = n^2 + n - 1$.
Thus, we have $a_1 = n^2 - 5n + 7$ and $a_k = n^2 + n - 1$, where $a_k - a_1 = 6n - 8 = 2(3n - 4)$.
We know that the sequence $a_i$ of odd numbers is arithmetic with common difference $2$, and hence has the formula $a_i = a_1 + 2(i-1)$. Since we found $a_k - a_1 = 2(3n - 4)$, we know that our last term is achieved when $i - 1 = 3n - 4$, so that $i = 3n - 3$, and we have $3(n-1)$ terms.
Thus, using infamous formula
$$S_k = \frac{k(a_1 + a_k)}{2},$$
we have $$S_k = \dfrac{3(n-1)(2n^2 - 4n + 6)}{2} = \dfrac{6(n-1)(n^2 - 2n + 3)}{2} = 3(n-1)(n^2-2n + 3).$$