Revision c67baffc-f8ff-48e3-9845-68b677d1cf34 - Code Golf Stack Exchange
A [constructible n-gon][1] is a regular polygon with n sides that you can construct with only a compass and an unmarked ruler.
As stated by Gauss, the only n for which a n-gon is constructible is a product of any number of distinct Fermat primes and a power of 2 (ie. `n = 2^k * p1 * p2 * ...` with `k` being an integer and every `p` some distinct Fermat prime).
A Fermat prime is a prime which can be expressed as F(n)=2^(2^n)+1 whith n a positive integer. The only known Fermat prime are for 0, 1, 2, 3 and 4.
#The challenge
Given an integer `n>2`, say if the n-gon is constructible or not.
#Specification
Your program or function should take an integer or a string representing said integer (either in unary, binary, decimal or any other base) and return or print a truthy or falsy value.
This is code-golf, so shortest answer wins, [standard loopholes][3] apply.
[Relevant OEIS][2]
#Examples
3 -> True
9 -> False
17 -> True
1024 -> True
65537 -> True
67109888 -> True
67109889 -> False
[1]: https://en.wikipedia.org/wiki/Constructible_polygon
[2]: https://oeis.org/A003401
[3]: http://meta.codegolf.stackexchange.com/questions/1061/loopholes-that-are-forbidden-by-default