Find remainder of large non-exponential integer divided by 180 Find the remainder when $12345678910111213...20172018$ is divided by $180$.
$$12345678910111213...20172018 \quad \text{mod} \quad 180$$
The large dividend is formed by writing all the natural numbers up to 2018 together.

I've read some posts similar on the community. And they took an approach some sort like this:
$$\text{Let } a=12345678910111213...20172018$$
$$180 =4\times5\times9$$
$$a\text{ mod }4 = 2$$
$$a\text{ mod }5 = 3$$
$$a\text{ mod }9 = 3$$
So $$a\text{ mod }180 = 2\times3\times3=18$$
I know there is definitely something wrong with my method, though I can't recall where I saw it.
Thanks for your help!

You are right about the three congruences: $a\equiv 2\pmod 4,
a\equiv 3\pmod 5, a\equiv 3\pmod 9$. Next you need to use the Chinese remainder theorem (twice) using Bezout formulas. First $$4*(-1)+1*5=1,$$ so $$a\equiv 4*(-1)*3+1*5*2=-2  \pmod{4*5}.$$ Then $$20*(-4)+9*9=1,$$ so $$a\equiv 20*(-4)*3+9*9*(-2)=-402\equiv 138 \pmod{20*9}$$
Answer:138.
