How to solve such a set of congruency?

25 Views Asked by At

I came across a question like this having multiple sets of congruency where a value was congruent to $1 \pmod n$ and then at last it was a multiple of $k$. So, was thinking if there is any general way to solve this without going through every line, finding a value of $a$ and inputting that into the next line when we know the value of $k$? $$\left\{\begin{array}{c} a\equiv 1\pmod 2\\ a\equiv 1\pmod 3\\ \vdots\\ a\equiv 1\pmod {k-1}\\ a\equiv 0\pmod k \end{array}\right.$$

1

There are 1 best solutions below

1
On

This is impossible unless $k$ is prime, as a consequence of Wilson's theorem. You probably want to use the Chinese Remainder Theorem for the general case.