0

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.

Jaideep Khare
  • 19,293
Thu Le
  • 433
  • 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. – Angina Seng Jun 24 '17 at 09:56
  • 1
    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$. – Donald Splutterwit Jun 24 '17 at 10:01

3 Answers3

5

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}}$$

Jaideep Khare
  • 19,293
  • so if $n$ is odd and can be expressed sum of consecutive numbers , is $n$ prime number? – Thu Le Jun 24 '17 at 10:05
  • @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. – Jaideep Khare Jun 24 '17 at 10:07
2

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

Robert Z
  • 145,942
1

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.

  • 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$.) – Barry Cipra Feb 10 '19 at 18:45
  • apologies for the meta comment and improvements – Chris Wallace Feb 11 '19 at 15:21