Let $n$ be a positive integer. $S$ is the set of nonnegative integers $a$ such that $1<a<n$ and $a^{a-1}-1$ is divisible by $n$. Prove that if $S=\{ n-1 \}$ then $n=2p$ where $p$ is a prime number. Mihai Cipu and Nicolae Ciprian Bonciocat
Problem
Source:
Tags: modular arithmetic, number theory proposed, number theory
07.04.2005 13:24
Should I repeat it again for you? Don't name topics like "nice", "very nice" and so on. Read http://www.mathlinks.ro/viewtopic.php?p=140098
08.04.2005 21:36
I can only prove that $n=2p_1...p_k$, $p_i$ are pairwise distinct prime numbers. How to prove $k=1$? I don't see something really easy?
08.04.2005 21:57
It's from a Romanian TST in 2002. I didn't solve it in the contest, but afterwards, I have solved it at least three times, and I always forget my solution and have to work it out again . It's getting pretty annoying.. As Myth has already mentioned, $n$ must be even and square-free. To see that it's even, we notice that if $n$ were odd we would have $(n-1)^{n-2}\equiv 1\pmod n$, so $n-1\not\in S$, and if $n$ could be written as $2^{a_1}p_2^{a_2}\ldots p_k^{a_k}$ with at least one $a_i>1$, then $1<a=2p_2\ldots p_k+1<n-1$ would also belong to $S$. We now know that $n=2p_2\ldots p_k$. Assume now that $k\ge 3$. By the Chinese Remainder Theorem, we can find $a\equiv 1\pmod 2,\equiv 1\pmod {p_2},\ldots,\equiv -1\pmod {p_k}$. This $a$ cannot be $1$, and it cannot be $n-1$, and since $a$ is odd, $a-1$ is even, so $a^{a-1}$ is $1\pmod{p_i},\ \forall i$. Is it Ok? If it is, I don't think I've ever found this solution before. They were all more complicated .
08.04.2005 22:02
My fault that I tried to find explicit form of $a$ for the square free case
05.02.2011 16:31
Later solved by grobber here http://www.artofproblemsolving.com/Forum/viewtopic.php?f=56&t=84654