OFFSET
1,12
FORMULA
For n = 2^m, a(n) = 0;
For odd n = p^m, a(n) = 1;
For odd n = p1^r1*p2^r2*...*pm^rm, a(n) = 2m-1;
For n = 2*p1^r1*p2^r2*...*pm^rm, a(n) = 2m-1 if p1, ..., pm are odd;
For n = 2^r*p1^r1*p2^r2*...*pm^rm, a(n) = 2m if p1, ..., pm are odd and r > 1.
MATHEMATICA
c[n_, y_] := Limit[D[Cyclotomic[n, 1/x], x], x -> y]; Table[Length[Solve[c[n, x] == 0, x, Reals]], {n, 1, 128}]
PROG
(PARI) a(n)=my(v=valuation(n, 2)); 2*omega(n>>v) - (v <= 1 && n > 2) \\ Andrew Howroyd, Oct 27 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Gevorg Hmayakyan, Oct 26 2023
STATUS
approved