Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Calculate $1^{30} + 2^{30} + 3^{30} + \ldots + 17^{30} \mod 31$

Using Fermat's Theorem: $$ 1^{30} = 1 \mod 31, $$ (since $31$ is prime). This implies the above is congruent to $17 \mod 31$

This is correct, right?

share|cite|improve this question
I think you have a typo in your solution: $1^{30} = 1$ (mod $31$), while true, is not what you meant to say (i.e. you need this fact for all the other 30th powers too). [See the answers below.] – Matt E Oct 18 '10 at 15:24
up vote 6 down vote accepted

True. But 1^n=1 mod whatever. Fermat's Little Theorem says that n^30=1 for all n prime to 31. So your answer of 17 is correct.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.