Find the sum of all of the integers in the set $\{-18,27,54,254,754,1036,3254\}$ that are congruent to 6 modulo 8.
$$\small{\text{
Find the sum of all of the integers
}}\\
\small{\text{
in the set $\{-18,27,54,254,754,1036,3254\}$
}}\\
\small{\text{
that are congruent to 6 modulo 8.
}}$$
$$\small{\text{$
\begin{array}{rcl}
-18 \equiv -2 & \equiv & 6 \pmod{8} \\
27 \equiv 3 & \not\equiv & 6 \pmod{8} \\
54 \equiv 6 & \equiv & 6 \pmod{8} \\
254 \equiv 6 & \equiv & 6 \pmod{8} \\
754 \equiv 2 & \not\equiv & 6 \pmod{8} \\
1036 \equiv 4 & \not\equiv & 6 \pmod{8} \\
3254 \equiv 6 & \equiv & 6 \pmod{8} \\
\end{array}
$}}$$
the sum is -18 + 54 + 254 + 3254 = 3544
$$\small{\text{
Find the sum of all of the integers
}}\\
\small{\text{
in the set $\{-18,27,54,254,754,1036,3254\}$
}}\\
\small{\text{
that are congruent to 6 modulo 8.
}}$$
$$\small{\text{$
\begin{array}{rcl}
-18 \equiv -2 & \equiv & 6 \pmod{8} \\
27 \equiv 3 & \not\equiv & 6 \pmod{8} \\
54 \equiv 6 & \equiv & 6 \pmod{8} \\
254 \equiv 6 & \equiv & 6 \pmod{8} \\
754 \equiv 2 & \not\equiv & 6 \pmod{8} \\
1036 \equiv 4 & \not\equiv & 6 \pmod{8} \\
3254 \equiv 6 & \equiv & 6 \pmod{8} \\
\end{array}
$}}$$
the sum is -18 + 54 + 254 + 3254 = 3544