# Constructible Polygon and Fermat's Prime

I came across this puzzle at some online contest(now completed)

Alexander, son of Phillip of Macedon, has ascended the throne of his father following his assassination. In these tumultuous times, he appoints you as head of the architectural division of his mighty army. The general of the army wants all the catapults to be inducted in the artillery which have a n-sided polygon base, and no two or more of them should have the same type of polygon as their base.However, for the structures to be agile and economic, it is required that the n should be an odd number and the polygon of the base should be constructable with help of a compass and straightedge.

Given the above situation, you are required to find out the total number of logs of woods required - each log of wood for each side of the base of structure - for the construction of all such catapults

I thought the result would be equal to the sum of the first 5 Fermat's Prime but unfortunately that wasn't correct.

Do you think the data provided is not sufficient or am I missing something? What could the possible answer to this question?

-
The Fermat primes aren't the only values of n for which n-gons are constructible; they're the only prime values of n with this property. Read further in the Wikipedia article. (And where does it say in the problem that there are 5 catapults?) – Qiaochu Yuan Jan 27 '11 at 15:09
Well n should be a product of 2^<something> and Fermat's prime but that <something> is out of my reach. 5 was my wild guess. – user6313 Jan 27 '11 at 15:10
The answer is 7304603327. – Sven Marnach Jan 27 '11 at 15:17
@Sven : How? Can you please explain? – user6313 Jan 27 '11 at 15:20
It is not known whether there are infinitely many Fermat primes, so it seems to me that the answer to this puzzle depends on an unsolved problem in number theory... – Rahul Jan 27 '11 at 21:57

An n-sided regular polygon can be constructed with compass and straightedge if and only if n is the product of a power of 2 and distinct Fermat primes. In other words, if and only if n is of the form $n = 2^kp_1p_2…p_s$, where k is a nonnegative integer and the $p_i$ are distinct Fermat primes.

(My emphasis)

-
What am I missing? Please do specify? – user6313 Jan 27 '11 at 15:12
en.wikipedia.org/wiki/… It's only two sentences. – Peter Taylor Jan 27 '11 at 15:26

A fairly specific hint: is a 15-gon constructable or not? How, and why?

(Hint to the hint: what is $\dfrac{2\pi}{5}-\dfrac{\pi}{3}$? Why does this matter?)

Now can you see which $n$-gons you might have left off your list?

-