Solving equations involving modulo operator In computer programming languages we have an operator called % which expresses the remainder between two numbers. For example $123\%100 = 23$.  
I have an equation evolving this operator, namely,  
$$\frac{5}{3}(N\%36) - \frac{2}{3}(N\%6) + 2(N\%25) - (N\%5) = (2N)\%100$$
Is there some easy way to solve this equation in $N$ or at least count the solutions within some range of numbers? (I would like some techniques from number theory rather than a brute force solution, which I have already calculated myself.)
 A: We note that $N$ solves your equation if and only if $900+N$ solves your equation.  Then, some quick code (e.g. the following) 
   Select[Range[900], 5 Mod[#, 36]/3 - 2 Mod[#, 6]/3 + 2 Mod[#, 25] - Mod[#, 5]
       == Mod[2 #, 100] &]

gives the following solutions in $[1,900]$:
$$\{1, 2, 3, 4, 30, 31, 32, 33, 34, 360, 361, 362, 363, 364, $$
$$390, 391, 392, 393, 394, 720, 721, 722, 723, 724, 900\}$$
We see that each solution occurs in a block of $4$, so we can think of our solutions as elements of 
$$\{0,30,360,390,720\},$$
shifted by an element of
$$\{i+900j : i \in [0,4],\, j \in \mathbb{Z}\}.$$
A: Here's a non-brute force proof that: $$N\equiv 0,1,2,3,4\textrm{ or }5\  (\operatorname{mod 30}),$$ i.e. $N=30a+b$ for some integers $a$ and $b$, with $b = 0,1,2,3,4,$ or $5$. Let $N\%d$ denote the minimal nonnegative remainder after division of $N$ by $d$, such that $0\leq N\%d < N$, where $N$ and $d$ are nonnegative integers. Then
$$N\%36 = N\%6 + 6k,$$
where $k = 1, 2, 3, 4,$ or $5$. Similarly:
$$N\%25 = N\%5 + 5l$$
where $l = 1, 2, 3,$ or $4$, and
$$(2N)\%100 = (2N)\%25 + 25m$$
where $m = 1, 2$, or $3$. Note furthermore that we have
$$(2N)\%25 = 2(N\%25) - 25r,$$
where $r=0\textrm{ or }1$. 
The above formulae substitute into your equation as follows:
$$\frac{5}{3}(N\%36) - \frac{2}{3}(N\%6) + 2(N\%25) - (N\%5) = (2N)\%100$$
$$\frac{5}{3}\left[ N\%6 + 6k \right]  -  \frac{2}{3}(N\%6)  +  2\left[ N\%5 + 5l \right] - (N\%5) = 2(N\%25) - 25r + 25m$$
$$N\%6 + 10k + N\%5 + 10l = 2\left[ N\%5 + 5l \right] - 25r + 25m$$
$$N\%6 - N\%5 = -10k - 25r + 25m$$
$$N\%6 - N\%5 = 5(5m -2k - 5r). \tag{$\star$}$$
Eq. $(\star)$ implies that $N\%6 - N\%5$ is divisible by five. However, remember that $\%$ was defined such that $0\leq N\%d < N$: thus $N\%6 \leq 5$ and $N\%5 \leq 4$. Thus, the only way for this difference to be divisible by $5$ is if
$$N\%6 - N\%5 = 0\textrm{ or }5.$$
Suppose that $N\%6 - N\%5 = 0$. Then $N\%6 = N\%5$, and since $0 \leq N\%5\leq 4$, we have:
$$N\%6 = N\%5 = 0,1,2,3,\textrm{ or }4. \tag{$*$}$$
You can convince yourself$^1$ that Eq. $(*)$ implies
$$N\%30 = 0,1,2,3,\textrm{ or }4,$$ i.e.
$$N\equiv 0,1,2,3\textrm{ or }4\  (\operatorname{mod 30}).$$
The other case, $N\%6 - N\%5 = 5$ implies $N\%5=0$ and $N\%6=5$, which implies $N\%30=5$, i.e. $N \equiv 5\ (\operatorname{mod 30})$.
Q.E.D.
This type of logic can probably be extended to give the complete solution to your problem, but I don't want to flog it to death. One first next step would be to show that the case $N\%6=5$, $N\%5=0$ can't occur.
This should anyway give you an idea of how basic arithmetic arguments can be brought to bear on this kind of problem. Sometimes things come to this when all else fails in research-level elementary number theory, for example in the proofs that an odd perfect number would have to have more than $k$ distinct prime factors, for various values of k.
$^1$One way to convince yourself is via the Chinese remainder theorem, but it isn't the only way.
