I am very confused by this statement "There exists some composite numbers with the property that for every $1<a < n,$ $$a^{n-1} \equiv 1 \pmod n.$$ Such numbers are called Carmichael numbers." First few examples of Carmichael numbers are $561,1105,1729\cdots.$ But I found that when $n=561 $there is $a=399$,when $n=1105$ there is $a=312$ and when $n=1729$ there is $a=462$ such that above property fails. Please explain this to me I am new to number theory.
2026-02-22 17:57:02.1771783022
What exactly is the definition of Carmichael numbers?
1.1k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
The correct definition is that a composite number $n$ is Carmichael if $a^{n-1}\equiv 1\pmod{n}$ whenever $a$ is relatively prime to $n$, not for all $1<a<n$.
If $a^{n-1}\equiv 1\pmod{n}$ for all $1<a<n$, that actually implies that $n$ is prime, since $a^{n-1}\equiv 1\pmod{n}$ implies $a$ is relatively prime to $n$ so no such $a$ is a factor of $n$.