Find two least composite numbers $n$ such that $n\mid2^n-2$ and $n\mid3^n-3$.

220 Views Asked by At

$n\mid2^n-2$
$n\mid3^n-3$.

It comes down to

$2^n \equiv 2 \mod n$
$3^n \equiv 3 \mod n$

But how can I solve this?

1

There are 1 best solutions below

0
On BEST ANSWER

As suggested in the comments, one clear path for the solution is to consider Carmichael numbers. The first two work: $561= 3 \cdot 11 \cdot 17$ and $1105= 5 \cdot 13 \cdot 17$.

The solutions $n \le 10000$ are $$ \begin{align} 561&= 3 \cdot 11 \cdot 17 \\ 1105&= 5 \cdot 13 \cdot 17 \\ 1729&= 7 \cdot 13 \cdot 19 \\ 2465&= 5 \cdot 17 \cdot 29 \\ 2701&= 37 \cdot 73 \\ 2821&= 7 \cdot 13 \cdot 31 \\ 6601&= 7 \cdot 23 \cdot 41 \\ 8911&= 7 \cdot 19 \cdot 67 \\ \end{align} $$ Of these, $2701$ is not a Carmichael number.