Determine the residue of $-811\pmod{24}$. Your answer should be an integer in the range $0,1,2,\ldots,22,23$.
To find the residue of a negative number, I can either add or subtract multiples of 24 until I get a positive number, or I can use the formula $r = n - 24\left\lfloor \frac{n}{24} \right\rfloor$ where $r$ is the residue, $n$ is the original number, and $\left\lfloor \cdot \right\rfloor$ denotes the greatest integer less than or equal to the argument. I will use the formula because it is more systematic and avoids trial and error. Plugging in $n = -811$, I get $r = -811 - 24\left\lfloor \frac{-811}{24} \right\rfloor$. To evaluate the floor function, I need to find the largest integer that is less than or equal to $\frac{-811}{24}$. I can use long division or a calculator to find that $\frac{-811}{24} \approx -33.79$. The largest integer that is less than or equal to this is -34. So, $\left\lfloor \frac{-811}{24} \right\rfloor = -34$. Substituting this into the formula, I get $r = -811 - 24(-34)$. Simplifying, I get $r = -811 + 816 = 5$. Therefore, the residue of $-811\pmod{24}$ is 5. 