0
$\begingroup$

I'm finding some necessary and sufficient conditions for a integer $n$ to be a prime number. But I'm not sure if "every prime number $p \, ,(p>3)$ can be expressed sum of consecutive number" is true. If it is right, I hope you help me prove that.

Thank you very much.

$\endgroup$
2
  • $\begingroup$ It's a well-known fun problem to determine which integers are (or aren't) sums of sequences of at least two consecutive positive integers. $\endgroup$ Commented Jun 24, 2017 at 9:56
  • 1
    $\begingroup$ Every odd number can be expressed as $2n+1=n+(n+1)$. Every number $m \equiv 2 \pmod{4}$ can ... $m= (n-1) +n +(n+1)+(n+2)$. Every number $ 4 \pmod{8}$ can ... The only ones that cannot are powers of $2$. $\endgroup$ Commented Jun 24, 2017 at 10:01

3 Answers 3

5
$\begingroup$

Every prime greater than or equal to $3$ is odd, and every odd is of the form $2k+1$ that is, $$\exists \,k \in \mathbb N \, : \,p=2k+1=\underbrace{(k)+(k+1)}_{\text{Sum of two consecutive integers}}$$

$\endgroup$
2
  • $\begingroup$ so if $n$ is odd and can be expressed sum of consecutive numbers , is $n$ prime number? $\endgroup$
    – Thu Le
    Commented Jun 24, 2017 at 10:05
  • $\begingroup$ @AnhThư No!! I am saying that every odd number can be expressed as the sum of two consecutive integers. Only this. What I continued is that every prime number is an odd number, thus it can be expressed as sum of two consecutive integers. $\endgroup$ Commented Jun 24, 2017 at 10:07
2
$\begingroup$

More generally, any positive integer which is not a power of $2$ can be written as the sum of two or more consecutive integers. See LINK

$\endgroup$
1
$\begingroup$

In addition primes are expressible ONLY as the sum of two consecutive positive integers - never as the sum of $3$ or more consecutive integers because any sequence of $k > 2$ consecutive integers is expressible as $n + (n+1) + ..(n+k-1)$ = $kn+ \frac{(k-1)k}{2}$.

If $k$ is odd, $k-1$ is divisible by $2$ so $k$ is a factor.

If $k$ is even, say $k=2m$ then $2mn+(2m-1)2m/2$ so $m$ is a factor.

Either way, the sum is nonprime.

$\endgroup$
2
  • $\begingroup$ The prime $3$ is the sum of three consecutive integers: $3=0+1+2$. No doubt you had positive integers in mind. (No doubt the OP did too, since clearly any number $p$ can be written trivially as the sum of the consecutive integers from $-(p-1)$ to $p$.) $\endgroup$ Commented Feb 10, 2019 at 18:45
  • $\begingroup$ apologies for the meta comment and improvements $\endgroup$ Commented Feb 11, 2019 at 15:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .