Find all positive integers $n, k$ such that $(n-1)!=n^{k}-1$.
Problem
Source:
Tags: modular arithmetic, number theory
18.12.2011 07:36
I think $x\in R$ then $(n;k)=(1;x);(2;1)(3;1)$
18.12.2011 07:45
You're missing $(5,2)$. To prove this statement, obvious we need $(n-1)! \equiv -1 \pmod{n}$, thus $n$ is prime. Let's consider $n > 5$. Then $2, \frac{n-1}{2}, n-1$ are distinct numbers in $(n-1)!$, thus $(n-1)^2|(n-1)!$. Therefore we need $(n-1)^2|(n^m - 1)$, so $(n-1)|(n^{m-1} + n^{m-2} + ... + 1) \implies (n-1)|m$. Therefore $m \ge n-1$. However, then $n^m \ge n^{n-1} > (n-1)! + 1$, contradiction. Thus $(2, 1), (3,1)$ and $(5,2)$ are the only solutions. EDIT: Fixed a typo and removed a solution I thought worked because I'm dumb.
18.12.2011 08:21
Thanks for the solution. dinoboy wrote: so $(n-1)|(n^{m-1} + n^{m-2} + ... + 1) \implies n|m$ I might be mistaken but do you mean $(n-1)|m$ there? Oh and how come $(1, a)$ is a solution as well? I thought $0!=1$?
18.12.2011 08:27
dinoboy wrote: so $(n-1)|(n^{m-1} + n^{m-2} + ... + 1) \implies n|m$ I might be mistaken but do you mean $(n-1)|m$ there? Can you please explain this ?
18.12.2011 12:27
ninepointcircle wrote: dinoboy wrote: so $(n-1)|(n^{m-1} + n^{m-2} + ... + 1) \implies n|m$ I might be mistaken but do you mean $(n-1)|m$ there? Can you please explain this ? for $0\leq k \leq m-1 : n^k-1 \equiv 0 (mod$ $n-1) \Rightarrow n^k \equiv 1 (mod$ $n-1)$ , so $0 \equiv n^{m-1}+n^{m-2}+...+1 \equiv 1+1+...+1=m (mod$ $n-1) $ I hope I made it more clear
24.05.2012 14:30
Oh nice, we just had this in our TST...