Question

# Find the integer a such that , a\equiv 24 (\bmod 31)\ and\ -15\leq a\leq 15

Analyzing functions
Find the integer a such that
$$\displaystyle{a}\equiv{24}{\left({b}\text{mod}{31}\right)}\ {\quad\text{and}\quad}\ -{15}\leq{a}\leq{15}$$

$$\displaystyle{a}\equiv{24}{\left({b}\text{mod}{31}\right)}$$ We can find a such that $$\displaystyle-{15}\leq{a}\leq{15}$$ by consecutively substracting 31 from 24 until we obtain a value between -15 and 15. $$\displaystyle{a}\equiv{24}{\left({b}\text{mod}{31}\right)}$$
$$\displaystyle\equiv{24}-{31}{\left({b}\text{mod}{31}\right)}$$
$$\displaystyle\equiv-{7}{\left({b}\text{mod}{31}\right)}$$ SInce -7 is between -15 and 15: $$\displaystyle{a}=-{7}$$