Prove that ## 1^{p}+2^{p}+3^{p}+\dotsb +(p-1)^{p}\equiv 0\pmod {p} ##.

  • Thread starter Math100
  • Start date
In summary, if ##p## is an odd prime, then## 1^{p}+2^{p}+3^{p}+\dotsb +(p-1)^{p}\equiv 0\pmod {p} ##.
  • #1
Math100
792
220
Homework Statement
Employ Fermat's theorem to prove that, if ## p ## is an odd prime, then
## 1^{p}+2^{p}+3^{p}+\dotsb +(p-1)^{p}\equiv 0\pmod {p} ##.
[Hint: Recall the identity ## 1+2+3+\dotsb +(p-1)=p(p-1)/2 ##.]
Relevant Equations
None.
Proof:

Suppose ## p ## is an odd prime such that ## p\geq 3 ##.
By Fermat's theorem, we have that ## a^{p}\equiv a\pmod {p} ##.
Then
\begin{align*}
&1^{p}\equiv 1\pmod {p}\\
&2^{p}\equiv 2\pmod {p}\\
&3^{p}\equiv 3\pmod {p}\\
&\vdots \\
&(p-1)^{p}\equiv (p-1)\pmod {p}.\\
\end{align*}
This means ## 1^{p}+2^{p}+3^{p}+\dotsb +(p-1)^{p}\equiv [1+2+3+\dotsb +(p-1)]\pmod {p} ##.
Since ## 1+2+3+\dotsb +n=\frac{n(n+1)}{2} ##,
it follows that ## 1+2+3+\dotsb +(p-1)=\frac{p(p-1)}{2} ##.
Observe that ## p-1 ## is even, so ## p-1=2k ## for some ## k\in\mathbb{N} ##.
Now we have ## 1+2+3+\dotsb +(p-1)=pk ##.
Thus ## 1^{p}+2^{p}+3^{p}+\dotsb +(p-1)^{p}\equiv pk\equiv 0\pmod {p} ##.
Therefore, if ## p ## is an odd prime, then ## 1^{p}+2^{p}+3^{p}+\dotsb +(p-1)^{p}\equiv 0\pmod {p} ##.
 
Physics news on Phys.org
  • #2
Math100 said:
Homework Statement:: Employ Fermat's theorem to prove that, if ## p ## is an odd prime, then
## 1^{p}+2^{p}+3^{p}+\dotsb +(p-1)^{p}\equiv 0\pmod {p} ##.
[Hint: Recall the identity ## 1+2+3+\dotsb +(p-1)=p(p-1)/2 ##.]
Relevant Equations:: None.

Proof:

Suppose ## p ## is an odd prime such that ## p\geq 3 ##.
By Fermat's theorem, we have that ## a^{p}\equiv a\pmod {p} ##.
Then
\begin{align*}
&1^{p}\equiv 1\pmod {p}\\
&2^{p}\equiv 2\pmod {p}\\
&3^{p}\equiv 3\pmod {p}\\
&\vdots \\
&(p-1)^{p}\equiv (p-1)\pmod {p}.\\
\end{align*}
This means ## 1^{p}+2^{p}+3^{p}+\dotsb +(p-1)^{p}\equiv [1+2+3+\dotsb +(p-1)]\pmod {p} ##.
Since ## 1+2+3+\dotsb +n=\frac{n(n+1)}{2} ##,
it follows that ## 1+2+3+\dotsb +(p-1)=\frac{p(p-1)}{2} ##.
I think the following detour isn't necessary. As a sum of integers, ##\frac{p(p-1)}{2} ## is automatically an integer, and ##p## obviously a factor. Hence ##\frac{p(p-1)}{2} \equiv 0\pmod{p}.##
Math100 said:
Observe that ## p-1 ## is even, so ## p-1=2k ## for some ## k\in\mathbb{N} ##.
Now we have ## 1+2+3+\dotsb +(p-1)=pk ##.
Thus ## 1^{p}+2^{p}+3^{p}+\dotsb +(p-1)^{p}\equiv pk\equiv 0\pmod {p} ##.
Therefore, if ## p ## is an odd prime, then ## 1^{p}+2^{p}+3^{p}+\dotsb +(p-1)^{p}\equiv 0\pmod {p} ##.
 
  • Like
Likes malawi_glenn and Math100
  • #3
fresh_42 said:
I think the following detour isn't necessary. As a sum of integers, ##\frac{p(p-1)}{2} ## is automatically an integer, and ##p## obviously a factor. Hence ##\frac{p(p-1)}{2} \equiv 0\pmod{p}.##
I guess I wrote too much then.
 
  • Like
Likes fresh_42
  • #4
Math100 said:
Homework Statement: Employ Fermat's theorem to prove that, if ## p ## is an odd prime, then
## 1^{p}+2^{p}+3^{p}+\dotsb +(p-1)^{p}\equiv 0\pmod {p} ##.
[Hint: Recall the identity ## 1+2+3+\dotsb +(p-1)=p(p-1)/2 ##.]
Relevant Equations: None.

Proof:

Suppose ## p ## is an odd prime such that ## p\geq 3 ##.
By Fermat's theorem, we have that ## a^{p}\equiv a\pmod {p} ##.
Then
\begin{align*}
&1^{p}\equiv 1\pmod {p}\\
&2^{p}\equiv 2\pmod {p}\\
&3^{p}\equiv 3\pmod {p}\\
&\vdots \\
&(p-1)^{p}\equiv (p-1)\pmod {p}.\\
\end{align*}
This means ## 1^{p}+2^{p}+3^{p}+\dotsb +(p-1)^{p}\equiv [1+2+3+\dotsb +(p-1)]\pmod {p} ##.
Since ## 1+2+3+\dotsb +n=\frac{n(n+1)}{2} ##,
it follows that ## 1+2+3+\dotsb +(p-1)=\frac{p(p-1)}{2} ##.
Observe that ## p-1 ## is even, so ## p-1=2k ## for some ## k\in\mathbb{N} ##.
Now we have ## 1+2+3+\dotsb +(p-1)=pk ##.
Thus ## 1^{p}+2^{p}+3^{p}+\dotsb +(p-1)^{p}\equiv pk\equiv 0\pmod {p} ##.
Therefore, if ## p ## is an odd prime, then ## 1^{p}+2^{p}+3^{p}+\dotsb +(p-1)^{p}\equiv 0\pmod {p} ##.
what about if p=2? because i have homework and in the question, they said for any prime p
 
  • #5
mathstudent1 said:
what about if p=2? because i have homework and in the question, they said for any prime p
##1^p + 2^p +3^p ~+ ... +~(p-1)^p \equiv 0~(\text {mod } p)## won't work if ##p=2##. Can you see why? What is the exact wording of the question?

(BTW, the original thread is over 1 year old.)
 
  • Like
Likes SammyS
  • #6
Steve4Physics said:
##1^p + 2^p +3^p ~+ ... +~(p-1)^p \equiv 0~(\text {mod } p)## won't work if ##p=2##. Can you see why? What is the exact wording of the question?

(BTW, the original thread is over 1 year old.)
because 1 is not congruent to 0 mod 2. so, this prove holds only for odd primes? the reason that I ask is because my teacher wrote for any prime proof that
##1^p + 2^p +3^p ~+ ... +~(p-1)^p \equiv 0~(\text {mod } p)##
 
  • #7
mathstudent1 said:
because 1 is not congruent to 0 mod 2.
Yes.

mathstudent1 said:
so, this prove holds only for odd primes?
Yes. (Of course we note that all primes are odd except for 2.)

(However, beware of terminology. The term 'even primes' is sometimes, very confusingly IMO, used to mean the sequence 2, 4, 6, 10, 14, 22, 26, 34, 38 .... E.g. see here.)

mathstudent1 said:
the reason that I ask is because my teacher wrote for any prime proof
Then I'd say it's a mistake/oversight.
 

FAQ: Prove that ## 1^{p}+2^{p}+3^{p}+\dotsb +(p-1)^{p}\equiv 0\pmod {p} ##.

What is the statement of the given congruence?

The statement is that for any prime number \( p \), the sum \( 1^{p} + 2^{p} + 3^{p} + \dotsb + (p-1)^{p} \) is congruent to \( 0 \) modulo \( p \).

Why is this congruence important?

This congruence is important because it is a special case of Fermat's Little Theorem, which states that for any prime number \( p \) and any integer \( a \), the congruence \( a^{p} \equiv a \pmod{p} \) holds. This congruence is a powerful tool in number theory and has many applications in cryptography and other areas.

How can we prove this congruence?

We can prove this congruence using Fermat's Little Theorem. By applying the theorem to each term in the sum \( 1^{p} + 2^{p} + 3^{p} + \dotsb + (p-1)^{p} \), we can show that each term is congruent to its respective integer modulo \( p \). Since there are \( p-1 \) terms in the sum, all of which are congruent to their respective integers modulo \( p \), the sum itself must be congruent to \( 0 \) modulo \( p \).

Can this congruence be generalized to other numbers?

Yes, this congruence can be generalized to any positive integer \( n \) instead of just prime numbers. In general, the sum \( 1^{n} + 2^{n} + 3^{n} + \dotsb + (p-1)^{n} \) is congruent to \( 0 \) modulo \( p \) for any positive integer \( n \) and prime number \( p \).

What are some applications of this congruence?

This congruence has applications in various areas of mathematics, including number theory, cryptography, and computer science. It can be used to prove the primality of numbers, generate pseudorandom numbers, and create secure encryption algorithms. Overall, this congruence is a fundamental result in number theory with many important applications.

Back
Top