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?
|
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? |
|||
|
|
|
What you wrote is not the sum of the primes up to $p$. 1 is not prime, and the meaning of your ellipsis is unclear. Based on one possible interpretation, a counterexample is that 2 does not divide $1+2$. Based on another, a counterexample is that 3 does not divide $2+3$. However, if $p$ is an odd number, and in particular if it is a prime other than 2, then $p$ divides the sum of the first $p$ positive integers, because this sum is $p\cdot\frac{p+1}{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. |
|||||||||||||||
|
|
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) |
|||||
|