Ternary cyclotomic polynomials with $n=15r$

Let $n=15r$ where $r>5$ is an odd prime number. If $r\!\!\! \mod 15 \equiv w$ then is it true that $\Phi_{n}(x)$ is not flat whenever $2<w<13$ ? In other words, are the flat ones necessarily among those satisfying $r\equiv \pm 1 \!\!\! \mod 15$ and $r\equiv \pm 2 \!\!\! \mod 15$. I am looking for a Yes or No answer, possibly with links please.

Yes

More precisely, the flat ones are exactly those where $r$ is $\pm 1$ modulo $15$, all others (including those $\pm 2$) are not flat.

The following result is due to Kaplan (Theorems 2 and 3 in the paper linked below):

Let $p<q<r$ be primes, and let $s > q$ be prime such that $s$ is $r$ or $-r$ modulo $pq$. Then the heights of the cyclotomic polynomials of order $pqr$ and $pqs$ are equal.

Using this result for $p=3$ and $q=5$, the problem in the question is reduced to checking it for a single prime in the relevant classes modulo $15$.

Using Wolfram|Alpha get

• for $r= 17$ it is not flat:

x^128+x^127+x^126-x^123-x^122-x^121+x^113+x^112-x^110-x^109-x^108-x^107+x^105+x^104+x^98+x^97-x^95-x^94-x^93-x^92+x^90+x^89+x^83+x^82-x^80-x^79-x^78+x^76+2 x^75+x^74-x^72-x^71-x^70+x^68+x^67-x^65-x^64-x^63+x^61+x^60-x^58-x^57-x^56+x^54+2 x^53+x^52-x^50-x^49-x^48+x^46+x^45+x^39+x^38-x^36-x^35-x^34-x^33+x^31+x^30+x^24+x^23-x^21-x^20-x^19-x^18+x^16+x^15-x^7-x^6-x^5+x^2+x+1

• for $r=19$ it is not flat:

x^144+x^143+x^142-x^139-x^138-x^137+x^129+x^128+x^127-x^125-2 x^124-2 x^123-x^122+x^120+x^119+x^118+x^114+x^113+x^112-x^110-2 x^109-2 x^108-x^107+x^105+x^104+x^103+x^99+x^98+x^97-x^95-2 x^94-2 x^93-x^92+x^90+x^89+x^88+x^87+x^86+x^85+x^84+x^83-x^81-2 x^80-2 x^79-2 x^78-x^77+x^75+x^74+x^73+x^72+x^71+x^70+x^69-x^67-2 x^66-2 x^65-2 x^64-x^63+x^61+x^60+x^59+x^58+x^57+x^56+x^55+x^54-x^52-2 x^51-2 x^50-x^49+x^47+x^46+x^45+x^41+x^40+x^39-x^37-2 x^36-2 x^35-x^34+x^32+x^31+x^30+x^26+x^25+x^24-x^22-2 x^21-2 x^20-x^19+x^17+x^16+x^15-x^7-x^6-x^5+x^2+x+1

• for $r=31$ it is flat:

x^240+x^239+x^238-x^235-x^234-x^233+x^225+x^224+x^223-x^220-x^219-x^218+x^210-x^207-x^205+x^202+x^195-x^192-x^190+x^187+x^180-x^177-x^175+x^172+x^165-x^162-x^160+x^157+x^150+x^146-x^141-x^140+x^135+x^131-x^126-x^125+x^120-x^115-x^114+x^109+x^105-x^100-x^99+x^94+x^90+x^83-x^80-x^78+x^75+x^68-x^65-x^63+x^60+x^53-x^50-x^48+x^45+x^38-x^35-x^33+x^30-x^22-x^21-x^20+x^17+x^16+x^15-x^7-x^6-x^5+x^2+x+1

• for $r=37$ it is not flat:

x^288+x^287+x^286-x^283-x^282-x^281+x^273+x^272+x^271-x^268-x^267-x^266+x^258+x^257+x^256-x^253-x^252-2 x^251-x^250-x^249+x^246+x^245+x^244+x^243+x^242+x^241-x^238-x^237-2 x^236-x^235-x^234+x^231+x^230+x^229+x^228+x^227+x^226-x^223-x^222-2 x^221-x^220-x^219+x^216+x^215+x^214+x^213+x^212+x^211-x^208-x^207-2 x^206-x^205-x^204+x^201+x^200+x^199+x^198+x^197+x^196-x^193-x^192-2 x^191-x^190-x^189+x^186+x^185+x^184+x^183+x^182+x^181-x^178-x^176-x^174-x^172+x^169+x^168+x^167+x^166-x^163-x^161-x^159-x^157+x^154+x^153+x^152+x^151-x^148-x^146-x^144-x^142-x^140+x^137+x^136+x^135+x^134-x^131-x^129-x^127-x^125+x^122+x^121+x^120+x^119-x^116-x^114-x^112-x^110+x^107+x^106+x^105+x^104+x^103+x^102-x^99-x^98-2 x^97-x^96-x^95+x^92+x^91+x^90+x^89+x^88+x^87-x^84-x^83-2 x^82-x^81-x^80+x^77+x^76+x^75+x^74+x^73+x^72-x^69-x^68-2 x^67-x^66-x^65+x^62+x^61+x^60+x^59+x^58+x^57-x^54-x^53-2 x^52-x^51-x^50+x^47+x^46+x^45+x^44+x^43+x^42-x^39-x^38-2 x^37-x^36-x^35+x^32+x^31+x^30-x^22-x^21-x^20+x^17+x^16+x^15-x^7-x^6-x^5+x^2+x+1

The $17$ shows it is not flat for $r$ congruent $\pm 2$, the $19$ shows it for $\pm 4$, the $37$ for $\pm 7$. While the $31$ shows flatness for $\pm 1$. This are all prime classes modulo $15$ and we are done.

The result for $\pm 1$ and $\pm 2$ could also be obtained as special cases of results of Kaplan and Elder, respectively. See section 8 of Elder's preprint.

Nathan Kaplan, Flat cyclotomic polynomials of order three, J. Number Theory 127 (2007), no. 1, 118--126.

• Come to think of it I could have used smaller primes. But I will leave it, at least for now. – user9072 Jan 23 '16 at 18:51
• Not a problem. It answers my question. Thank you very much. – user204463 Jan 23 '16 at 19:45
• Is $(3,5)$ the only pair where the flat ones are squeezed in the margin of $\pm 1$? For example the "next" pair $(3,7)$ has a "gap" for $w=10,11$. I mean the flat ones occur at margin of $\pm 1,\pm 2$ as well as $\pm 10$ using the theorem you mentioned. – user204463 Jan 23 '16 at 20:08
• The pair $(3,7)$ is different in that $7$ is $1$ modulo $3$ and thus $\pm 2$ is flat. This is true for any pair $p<q$. I have no explanation for $\pm 10$. I have no good intuition on this problem. One could do some numerical tests. – user9072 Jan 23 '16 at 20:13
• If my calculations are correct then $(5,7)$ is another pair like that. I mean the flat ones occur only within the margin of $\pm 1$. My wild guess is the gap $q-p=2$ is responsible for that. – user204463 Jan 24 '16 at 0:06