Homepage › Solution manuals › Ivan Niven › An Introduction to the Theory of Numbers › Exercise 1.3.41* (Primes and sum of consecutive integers.)
Exercise 1.3.41* (Primes and sum of consecutive integers.)
Prove that an odd integer is a prime if and only if it is not expressible as a sum of three or more consecutive positive integers.
Answers
Proof. Let be any odd integer.
-
We prove first that if is a sum of three or more consecutive positive integers, then is not a prime.
By Exercise 40, if is sum of consecutive positives, with , then
- If is odd, , where and are integers.
- If is even, , where and are integers.
Since and , , and . A fortiori and . Hence in both cases is composite.
-
Conversely, we show that if is odd and composite, then is a sum of three or more consecutive positive integers.
Since is odd and composite, is a product of at least two odd primes:
where are odd primes.
Write the least prime divisor of , and define
Then
where are integers, and because is an odd prime.
It remains to verify that .
This last inequality is true, because is composite, so and by (1)
so , a fortiori . This proves . Therefore
thus is a sum of three or more consecutive positive integers.
Taking the negations, these two parts show that an odd integer is a prime if and only if it is not expressible as a sum of three or more consecutive positive integers. □