Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

From Problem 46 of Project Euler :

It was proposed by Christian Goldbach that every odd composite number can be written as the sum of a prime and twice a square.

$$9 = 7 + 2 \cdot 1^2$$

$$15 = 7 + 2 \cdot 2^2$$

$$21 = 3 + 2 \cdot 3^2$$

$$25 = 7 + 2 \cdot 3^2$$

$$27 = 19 + 2 \cdot 2^2$$

$$33 = 31 + 2 \cdot 1^2$$

It turns out that the conjecture was false.

What is the smallest odd composite that cannot be written as the sum of a prime and twice a square?

As soon as I read this problem, I've immediately fought that the smallest odd number 1 was not on the list of examples. Then I've thought that 1 can be the answer. The only way that I could write 1 close to the problem $1=1+2 \cdot 0^2$, Which is of course false. I've also tried to give 1 as answer, but the site didn't accepted. So how can we write 1 as a sum of a prime and twice a square?

share|cite|improve this question
From wikipedia: "The number one is a unit; it is neither prime nor composite" – P.. Jun 5 '13 at 6:27
up vote 2 down vote accepted

If we take primes to be positive, it cannot be done. This is because primes are greater than $1$, and twice a square number is positive.

This is not contradictory to the problem though, because $1$ is not composite.

If we allow primes to be negative (considering prime elements in the ring of integers), we can write $1=-7+2\cdot2^2$.

share|cite|improve this answer
Thanks, didn't see the word composite. – moray95 Jun 5 '13 at 6:14

$1$ is not the product of two smaller positive integers. So it isn't composite, and the conjecture doesn't apply.

share|cite|improve this answer

1 is a unit number (with multiplicative inverse in the integers), not a composite number. Also, the conjecture is for odd composite numbers which begins from 9.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.