Q:

What is the following expression simplified to?

$$x \mod 1000 \mod 5$$
I would have thought that it was $x \mod 5000$  except that it doesn't hold true for $x = 5005$ since you'll get zero, but $5005 \mod 5000 = 5$.

A:

Since 5 is a divisor of 1000, I believe the expression would simplify to "x mod 5" as adding multiples of 1000 wouldn't change the remainder when divided by 5.

