How to calculate congruence for all $n\in\mathbb{N}$?

37 Views Asked by At

We have

$43 \equiv 1 \mod n$.

How to find all $n\in\mathbb{N}$?

So I know formula $b = a + kn$, where $k\in\mathbb{Z}$. It looks to me like I need to calculate all combinations of $k$ and $n$ which will give $42$, or to find all natural numbers which are dividing $42$.

Am I missing something obvious, and if so, what is the easiest way to calculate all n's?

3

There are 3 best solutions below

0
On BEST ANSWER

It looks to me like I need to calculate all... natural numbers which are dividing $42$.

Am I missing something obvious?

It's true that it suffices to compute all the natural numbers which divide $42$. There are only $8$ (positive) factors of $42$.

0
On

Finding all factors of $42$ should be enough. Since $42$ factors as $2\times3\times7$, all factors have the form $2^a3^b7^c$, where $0\le a,b,c\le1$. If you simply need to calculate how many values of $n$ are valid, note that there are $2$ choices each for $a,b,$ and $c$.

0
On

$$43 \equiv 1 \mod n \Leftrightarrow 43=q\cdot n+1 \Leftrightarrow q\cdot n =42 \Leftrightarrow q=\frac{42}{n}$$

So $n$ must divide $42=2^1\cdot 3^1\cdot 7^1$, which means that it has $(1+1)(1+1)(1+1)=8$ positive numbers that divide $42$.

Then $n$ cans assume $8$ values.