0

Here is a graph for the first few primes vs sum. prime vs sum

2 Answers2

2

$\sum_{n=1}^{p-1} = \frac{(p-1)p}{2}$ which has a factor of $p$ for any $p>2$.

kcborys
  • 574
1

$$\sum_{n=1}^{p-1}n=1+2+3+...+(p-1)=\frac{p(p-1)}{2}$$

thus, your sum will become $$x=\frac{p-1}{2}=\frac{\phi(p)}{2}$$

where $n \mapsto \phi(n) $ is the Euler totient function.

  • 1
    I'm sure the answer'er knows but for the OP, this only shows $x= \phi(p)/2$ is a rational number. For $x$ to be an integer, $\phi(p)$ would have to be even, so that you could cancel a factor of $2$ and get an integer. But $\phi(p)$ is even for all $n>2$. So this will always be the case. Equivalently, because $p$ is prime, $p-1$ must be even for $p>2$. – mathematics2x2life Oct 24 '19 at 20:04