I am trying assignment and I am unable to think about this problem. Can someone please help.
Question is -> prove that $ (n-1)^2 $ divides $ n^k -1$ iff (n-1) divides k.
I shall be really grateful.
I am trying assignment and I am unable to think about this problem. Can someone please help.
Question is -> prove that $ (n-1)^2 $ divides $ n^k -1$ iff (n-1) divides k.
I shall be really grateful.
Hint
Let $n-1=m,n=?$
Using binomial expansion,
$$n^k-1=(1+m)^k-1\equiv \binom k1m^1\pmod{m^2}$$
Hint $$n^k-1=(n-1)(n^{k-1}+n^{k-2}+..+n+1) =(n-1) \left( n^{k-1}-1+n^{k-1}-1+...+n-1+k\right)\\ =(n-1) \left( n^{k-1}-1+n^{k-1}-1+...+n-1\right)+k(n-1) $$
Now use the fact that in the first bracket you can factor out an $(n-1)$ from each term.