Take the 2-minute tour ×
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.

Is the sum of primes up to p a multiple of p?

i.e Is 1+2+...+p divisible by p and how would you prove it?

share|improve this question

closed as off-topic by Jonas Meyer, Grigory M, dustin, Mark Bennet, Did Jan 18 at 18:59

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Grigory M, dustin, Did
If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers 2

$\begin{array}{rcl}\rm{\bf Hint}\quad\quad\ \ S &=&\rm 1 \ \ \ +\ \ \: 2\ \ \ \ +\ \:\cdots\ +\ p\!-\!1\ +\ p \\ \rm S &=&\rm p \ \ +\ p\!-\!1\ +\,\ \cdots\ +\,\quad 2\ \ \ +\ \ 1\\ \hline \\ \rm Adding\ \ \ \ 2\: S &=&\rm p\ (p+1)\end{array}$

A famous legend says Gauss used this trick to quickly compute $ 1+2+\:\cdots\:+100\ $ in grade school.

This trick of pairing up reflections around the average value is a special case of exploiting innate symmetry - here a reflection or involution. It's a ubiquitous powerful technique, e.g. see my post on Wilson's Theorem and it's group theoretic generalization.

share|improve this answer
Not what was asked. See Jonas Meyer's answer. –  lhf Oct 18 '10 at 1:20
@lhf: No, this is the only sensible interpretation of what was asked. The other possible interpretation doesn't make sense for two reasons: the sum includes 1, which isn't prime and, moreover, this other interpretation has trivial counterexamples. –  Bill Dubuque Oct 18 '10 at 21:31
@Jonas: I'm glad to hear that you found the link interesting. I too am perplexed by the downvote. Perhaps someone objects to me frequently exploiting those poor little symmetries. –  Bill Dubuque Oct 18 '10 at 23:19

Or if by the ellipsis you mean the sum of naturals up to p, it is true and not just for primes. The sum of naturals up to n is $n*(n+1)/2$, which can be proved by induction, and is divisible by n. (as commented, only if n is odd)

share|improve this answer
...if n is odd. –  Jonas Meyer Oct 18 '10 at 1:06

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