# Non-trivial solutions of $x(x-1) \equiv 0 \ (\text{mod} \ 10^k)$

I need to show that there are exactly two non-trivial solutions of $$x(x-1) \equiv 0 \ (\text{mod} \ 10^k)$$for any $k$.

The only thing I've figured out is that one of the numbers has to be divisible by $2^k$ and another one has to be divisible by $5^k$ (and it could not be even). I'd be happy if someone gives me any help or advice!

• What do you mean by finding them? If you want an explicit formula, I don't think that is possible. – Emre Jan 17 '17 at 0:56
• Actually, I need only to show that there are exactly two non-trivial solutions. – nag Jan 17 '17 at 0:57
• What counts as "trivial" solutions? $x \equiv 0,1$ mod $10^k$? – Torsten Schoeneberg Jan 17 '17 at 0:59
• Yes, these ones – nag Jan 17 '17 at 1:00
• Since two answers have already been posted saying that $x(x-1) \equiv 0 \pmod{10^k}$ implies either $x\equiv 0 \pmod{10^k}$ or $x-1\equiv 0 \pmod{10^k}$, and were subsequently deleted after a simple counterexample ($x=6,k=1$) was pointed out, I thought I'd make note of those events in a comment. I hope this saves anyone else the wasted effort of posting such an answer. – David K Jan 17 '17 at 1:10

1. If $2^k\lvert x$, then $5^k\lvert x-1$. So, $$x\equiv 0\pmod{2^k}\text{ and } x\equiv 1\pmod{5^k}$$ By Chinese Remainder Theorem, there is a unique $x$, between $0$ and $10^k-1$ satisfying these equations.
2. Similarly, if $2^k\lvert x-1$, then $5^k\lvert x$. So, $$x\equiv 1\pmod{2^k}\text{ and } x\equiv 0\pmod{5^k}$$ By Chinese Remainder Theorem, there is a unique $x$, between $0$ and $10^k-1$ satisfying these equations, too. And clearly two cases give different solutions.