Establish below :- \(1^n+2^n+3^n + ... + (p-1)^n \equiv 0 (\mod{p}) ~~if~~ (p-1) \not{|} n\) \(1^n+2^n+3^n + ... + (p-1)^n \equiv -1 (\mod{p}) ~~if ~~ (p-1) | n\) using basic properties of congruences + Fermat's little theorem. \(p\) is a prime > 2
You stole my question! @ganeshie8
yahh its an interesting one, worth spending time :)
Wanna borrow my textbook while you're at it? :)
sure, im still working on it xD
Use \mbox to make \(\mbox{if}\) :)
NB: I skipped heck-a-lot of steps \[\mbox{if }(p-1)|n,\]\[\large\begin{array}{clrr} &1^n+2^n+3^n+4^n+...+(p-1)^n&\\ =&1^{m(p-1)}+2^{m(p-1)}+...+(p-1)^{m(p-1)}\\ \equiv&\begin{array}{c}\underbrace{1+1+1+...+1}\\p-1\end{array}&\mod p&\mbox{(FLT)}\\ =&p-1\\ \equiv&-1&\mod p&\\ \end{array}\]
looks great ! part 1 looks tough
this problem can be solved using order of an element \[ord_pg=n\] where \[\phi(p)=p-1|n\] \[g^n\equiv1\mod p\\ 1\le g<p\] if \[\phi(p)=p-1\cancel{|}n\] then \[g^n\equiv0\mod p\]
since the is no least element to make gaurantee fermat
primitive roots can also give a better intuition here
Join our real-time social learning platform and learn together with your friends!