# Infinitude of cyclotomic polynomials with a certain number of terms

Let $\Phi_n$ be the $n$th cyclotomic polynomial: $${\Phi _{n}(x)=\!\!\prod _{\substack {1\leq k\leq n \\ \gcd(k,n)=1}} \!\!\big(x-e^{2i\pi {k/n}}\big).}$$

Here is a list of the first 30 cyclotomic polynomials.

Given an integer $k$, is there were always infinitely many integers $n$ such that $\Phi_n$ has $k$ terms, and if yes is it possible to classify them?

A friend of mine thinks there are infinitely many such $n$ for every prime $k$. However, $\Phi_{105}$ has $33$ terms so this does not happen just for prime $k$.

For $k=2$ there are infinitely many $n$ such that $\Phi_n$ has $k=2$ terms and I was told that this happens if and only if $n$ is a power of $2$. This is apparent in wikipedia's list, as the only cyclotomic polynomials with $2$ terms are $\Phi_1,\Phi_2,\Phi_4,\Phi_8$ and $\Phi_{16}$.

Taking $k=3$, the orders of the cyclotomic polynomials with $3$ terms does not match the powers of $3$: $\Phi_{12}=x^4-x^2+1$ and $\Phi_{24}=x^8-x^4+1$ both have $3$ terms and their orders, $12$ and $24$, are not powers of $3$ (though they are powers of $2$ times $3$, and the other orders $\leq 30$ of the cyclotomic polynomials with $3$ terms are precisely the powers of $3$).

For $k=5$, the only cyclotomic polynomials of order $\leq 30$ with $5$ terms are once again those whose orders are powers of $2$ times $5$. This does not extend to $k=7$ however as $\Phi_{15}$ has $7$ terms but its order isn't even disible by $7$.

• If $\phi_n$ has $k$ terms and $p$ defines $n$ then $\phi_{pn}(x) = \phi_n(x^p)$ has $k$ terms also. So this shows that if a number appears then it appears infinitely often, and also shows that to check whether a number appears it is sufficient to check the squarefree $n$. – Will Sawin Apr 8 '18 at 20:51
• What Will Sawin said (except for the "defines" part, which likely is spellcheck for "divides"). At mathoverflow.net/questions/221357 is a link to notes of Jameson (cyp.pdf) which establish this and many other properties of cyclotomic polynomials rather quickly and efficiently. Gerhard "And Helped Me To Estimate" Paseman, 2018.04.08. – Gerhard Paseman Apr 8 '18 at 20:59
• In fact, the result in my previous comment is true because $\Phi_n(1)$ is odd for $n\geq 3$ and $n\neq 2^k$, and $x^{\phi(n)}\Phi_n(1/x)=\pm \Phi_n(x)$. So the question should be whether every odd $t\geq 3$ is the number of terms of some $\Phi_n(x)$. – Richard Stanley Apr 9 '18 at 0:49
• "the number of terms of the $n$th cyclotomic polynomial" is a sequence in the Online Encyclopedia of Integer Sequences; the references there are presumably worth checking out. – Greg Martin Apr 9 '18 at 8:53
• I computed with Pari/GP the number of terms of $\Phi_n$ for $n \leq 10^5$ (it took approximately 1 hour). The following odd integers seem not to be attained : $k=21, 27, 35, 45, 51, 69, 75, 77, 85, 87, 91, 93, 115, 117, 123, 133, 141, 147, 153, 155, 165, 171, 187, 195$ – François Brunault Apr 9 '18 at 23:11