TITLE: What is the remainder when the product of the primes between 1 and 100 is divided by 16?
QUESTION [12 upvotes]: The product of all the prime numbers between 1 and 100 is equal to $P$. What is the remainder when $P$ is divided by 16?
I have no idea how to solve this, any answers?

REPLY [10 votes]: If the product of the odd primes is $8k+r$ then the product of all of them is $16+2r$. So we only need to work $\bmod 8$. We only need to find primes with residues $3,5$ and $7$. We do it as follows:
$$\begin{pmatrix}
3 && 5 && 7\\
11 && 13 && 15 \\
19 && 21 && 23\\
27 && 29 && 31\\
35 && 37 && 39\\
43 && 45 && 47\\
51 && 53 && 55\\
59 && 61 && 63\\
67 && 69 && 71\\
75 && 77 && 79\\
83 && 85 && 87\\
91 && 93 && 95\\
99\\
\end{pmatrix}$$
Then take out non-prime multiples of $3,5,7$
$$
\require{cancel}
\begin{pmatrix}
3 && 5 && 7\\
11 && 13 && \cancel{15} \\
19 && \cancel{21} && 23\\
\cancel{27} && 29 && 31\\
\cancel{35} && 37 && \cancel{39}\\
43 && \cancel{45} && 47\\
\cancel{51} && 53 && \cancel{55}\\
59 && 61 && \cancel{63}\\
67 && \cancel{69} && 71\\
\cancel{75} && \cancel{77} && 79\\
83 && \cancel{85} && \cancel{87}\\
\cancel{91} && \cancel{93} && \cancel{95}\\
\cancel{99}\\
\end{pmatrix}$$
The only column with an odd number of remaining elements is $3\bmod 8$, so the answer is $6$