%I #20 Dec 22 2018 12:08:45
%S 4,1,105,385,1365,2145,2805,3135,6545,7917,10465,10465,10465,10465,
%T 10465,11305,11305,11305,11305,11305,11305,11305,15015,17255,17255,
%U 17255,20615,25935,26565,26565,26565,26565,26565,26565,26565,26565,26565,26565,26565,26565,26565,26565
%N Least k such that the k-th cyclotomic polynomial has -n as a coefficient.
%C Suzuki proves that a(n) exists for each n.
%H Jiro Suzuki, <a href="http://projecteuclid.org/euclid.pja/1195513653">On coefficients of cyclotomic polynomials</a>, Proc. Japan Acad. Ser. A Math. Sci. 63:7 (1987), pp. 279-280.
%H R. C. Vaughan, <a href="http://projecteuclid.org/euclid.mmj/1029001352">Bounds for the coefficients of cyclotomic polynomials</a>, Michigan Math. J. 21 (1974), 289-295 (1975).
%e Phi(105) = x^48 + x^47 + x^46 - x^43 - x^42 - 2x^41 - x^40 - x^39 + x^36 + x^35 + x^34 + x^33 + x^32 + x^31 - x^28 - x^26 - x^24 - x^22 - x^20 + x^17 + x^16 + x^15 + x^14 + x^13 + x^12 - x^9 - x^8 - 2x^7 - x^6 - x^5 + x^2 + x + 1, with -2 as the coefficient of x^7 (among others), and this is the least k for which -2 appears, so a(2) = 105.
%t Table[k = 1; While[! MemberQ[CoefficientList[Cyclotomic[k, x], x], -n], k++]; k, {n, 0, 9}] (* _Michael De Vlieger_, Sep 29 2015 *)
%o (PARI) a(n)=my(k,v);while(!setsearch(Set(Vec(polcyclo(k++))),-n),);k
%Y Cf. A013594, A013595, A046887, A262404, A160340, A278567.
%K nonn
%O 0,1
%A _Charles R Greathouse IV_, Sep 21 2015
%E More terms from _Seiichi Manyama_, Dec 22 2018