Question 254068
<font face="Garamond" size="+2">


You didn't say, but the only way this works is if <i>n</i> is an integer.  Use the modulo function. *[tex \Large n \text{ mod } m] returns the remainder when <i>n</i> is divided by <i>m</i>.  For positive integers, the range of the modulo function is *[tex \Large \{0, 1, 2, \cdots, m\,-\,1\}], therefore for *[tex \Large n \text{ mod } 3], the range is *[tex \Large \{0, 1, 2\}].


So there are three possibilities regardless of the value of <i>n</i>:


*[tex \LARGE \ \ \ \ \ \ \ \ \ \ n \text{ mod } 3\ =\ 0\ \Rightarrow\ n\,+\,2 \text{ mod } 3\ =\ 2 \text{ and } n\,+\,4 \text{ mod } 3\ =\ 1]


*[tex \LARGE \ \ \ \ \ \ \ \ \ \ n \text{ mod } 3\ =\ 1\ \Rightarrow\ n\,+\,2 \text{ mod } 3\ =\ 0 \text{ and } n\,+\,4 \text{ mod } 3\ =\ 2]


*[tex \LARGE \ \ \ \ \ \ \ \ \ \ n \text{ mod } 3\ =\ 2\ \Rightarrow\ n\,+\,2 \text{ mod } 3\ =\ 1 \text{ and } n\,+\,4 \text{ mod } 3\ =\ 0]


For each of the three possibilities, there is only one 0 result, hence only one of the numbers is divisible by 3.


If <i>n</i> is a negative integer, the range of *[tex \Large n \text{ mod } 3] is *[tex \Large \{-2, -1, 0\}] and the result is the same.


John
*[tex \LARGE e^{i\pi} + 1 = 0]
</font>