Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Find the number of solutions of $x^2=x\mod m$ for any integer $m$.

I was thinking about bringing the $x$ over to the other side and somehow apply chinese remainder thm.

share|improve this question
add comment

1 Answer 1

Start with

$$ x^2 - x = x(x-1) \equiv 0 \mod m $$ Now, if $m=p^an$, where $p$ is a prime and $p\not| n$, then you can write that $$ x(x-1) \equiv 0 \mod p^a $$ Determine under which conditions you get a solution to this, and repeat for each prime factor of $m$. Then consider the total number of solutions based on the same reasoning as the Chinese Remainder Theorem (no need to actually use the theorem, unless you're finding all of the solutions).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.