Question 1209288
<font color=black size=3>
For now I'll consider the equation n^2 = 144 + 24n


Let's get everything to one side and then apply the quadratic formula.
n^2 = 144 + 24n
n^2-24n-144 = 0
{{{n = (-b+-sqrt(b^2-4ac))/(2a)}}}


{{{n = (-(-24)+-sqrt((-24)^2-4(1)(-144)))/(2(1))}}}


{{{n = (24+-sqrt(1152))/(2)}}}


{{{n = (24+sqrt(1152))/(2)}}} or {{{n = (24-sqrt(1152))/(2)}}}


{{{n = 28.970563}}} or  {{{n = -4.970563}}}
The decimal values are approximate.


Draw out a number line. 
Mark -4.970563 and 28.970563 on it.


Let's test an integer value to the left of -4.970563
I'll try n = -5
n^2 < 144 + 24n
(-5)^2 < 144 + 24*(-5)
25 < 24
which is false
We eliminate the subset of integers that are -5 or smaller.


Now try an integer value between -4.970563 and 28.970563
I'll pick n = 0
(0)^2 < 144 + 24(0)
0 < 144
which is true
If n is any of the following integers {-4, -3, ..., 27, 28} then the inequality n^2 < 144 + 24n is true.


Lastly we need to test an integer larger than 28.970563
I'll pick n = 29
n^2 < 144 + 24n
(29)^2 < 144 + 24*(29)
841 < 840
which is false
We can eliminate the set of integers that are 29 or larger


--------------------------------------------------------------------------


To summarize we found the integer solution set is {-4, -3, ..., 27, 28}
There are p = 4 items in {-4, -3, -2, -1}
There are q = 28 items in {1,2,3,...,27,28}
So far that's p+q = 4+28 = 32 nonzero integers accounted for.
Then there's 0 itself to bump the final count to 33.


Or you can use the formula last-first+1 to count the number of consecutive integers in a list.
last-first+1 = 28-(-4)+1 = 28+4+1 = 33



Answer: 33
</font>