OpenStudy (ganeshie8):

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

OpenStudy (anonymous):

You stole my question! @ganeshie8

OpenStudy (ganeshie8):

yahh its an interesting one, worth spending time :)

OpenStudy (anonymous):

Wanna borrow my textbook while you're at it? :)

OpenStudy (ganeshie8):

sure, im still working on it xD

OpenStudy (kc_kennylau):

Use \mbox to make \(\mbox{if}\) :)

OpenStudy (kc_kennylau):

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}\]

OpenStudy (anonymous):

looks great ! part 1 looks tough

OpenStudy (anonymous):

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\]

OpenStudy (anonymous):

since the is no least element to make gaurantee fermat

OpenStudy (anonymous):

primitive roots can also give a better intuition here