OFFSET
1,4
COMMENTS
After the second term, the entries are always odd; see Dresden's article for proof.
LINKS
G. Dresden, On the Middle Coefficient of a Cyclotomic Polynomial (MAA Monthly, 2004, 531-533).
MAPLE
vals:= {1, 0, -1}:
a[1]:= 1; a[2]:= 0: a[3]:= -1:
count:= 3:
for n from 4 while count < 20 do
f:= ifactors(n)[2];
if nops(f) <= 2 or max(f[.., 2])>1 then next fi;
p:= numtheory:-cyclotomic(n, x);
c:= coeff(p, x, degree(p, x)/2);
if not member(c, vals) then
count:= count+1;
a[count]:= c;
vals:= vals union {c};
fi
od:
seq(a[i], i=1..count); # Robert Israel, Dec 18 2014
MATHEMATICA
vals={1, 0, -1}; lst={3, 4, 6}; Do[pwrs=Transpose[FactorInteger[n]][[2]]; If[Length[pwrs]>2 && 1==Times@@pwrs, c=Coefficient[Cyclotomic[n, x], x, EulerPhi[n]/2]; If[ !MemberQ[vals, c], AppendTo[lst, n]; AppendTo[vals, c]]], {n, 7, 50000, 2}]; vals
CROSSREFS
KEYWORD
hard,sign
AUTHOR
T. D. Noe, Jun 10 2004
EXTENSIONS
More terms from Jozsef Pelikan, Dec 18 2014
STATUS
approved