%I #36 Sep 01 2024 10:43:51
%S 1,1,1,1,1,1,2,1,1,1,1,1,2,1,1,1,1,1,2,1,1,1,1,1,2,1,1,2,1,2,1,1,1,1,
%T 1,2,1,2,1,1,1,3,1,1,1,1,1,1,2,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,2,2,1,
%U 1,1,3,1,1,1,2,1,2,1,2,1,1,2,1,1,1,1,1,3,1,1,1,2,1,2,1,1,1,1,2,1,2,1,1,1,2
%N Maximal coefficient (in absolute value) of cyclotomic polynomial C(N,x), where N = n-th number which is a product of exactly three distinct primes = A007304(n).
%C E. Lehmer (1936) shows that this sequence is unbounded.
%H Alois P. Heinz, <a href="/A278567/b278567.txt">Table of n, a(n) for n = 1..20000</a>
%H Emma Lehmer, <a href="http://dx.doi.org/10.1090/S0002-9904-1936-06309-3">On the magnitude of the coefficients of the cyclotomic polynomial</a>, Bull. Amer. Math. Soc. 42 (1936), 389-392.
%e The first 2 occurs in the famous C(105,x), which is x^48+x^47+x^46-x^43-x^42-2*x^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-2*x^7-x^6-x^5+x^2+x+1.
%p with(numtheory):
%p b:= proc(n) option remember; local k;
%p for k from 1+`if`(n=1, 0, b(n-1)) while
%p bigomega(k)<>3 or nops(factorset(k))<>3 do od; k
%p end:
%p a:= n-> max(map(abs, [coeffs(cyclotomic(b(n), x))])):
%p seq(a(n), n=1..120); # _Alois P. Heinz_, Nov 26 2016
%t f[n_] := Max[ Abs[ CoefficientList[ Cyclotomic[n, x], x]]]; t = Take[ Sort@ Flatten@ Table[Prime@i Prime@j Prime@k, {i, 3, 35}, {j, 2, i -1}, {k, j -1}], 105]; f@# & /@ t (* _Robert G. Wilson v_, Dec 09 2016 *)
%o (Python)
%o from math import isqrt
%o from sympy import primepi, primerange, integer_nthroot, cyclotomic_poly
%o def A278567(n):
%o def f(x): return int(n+x-sum(primepi(x//(k*m))-b for a,k in enumerate(primerange(integer_nthroot(x,3)[0]+1),1) for b,m in enumerate(primerange(k+1,isqrt(x//k)+1),a+1)))
%o def bisection(f,kmin=0,kmax=1):
%o while f(kmax) > kmax: kmax <<= 1
%o while kmax-kmin > 1:
%o kmid = kmax+kmin>>1
%o if f(kmid) <= kmid:
%o kmax = kmid
%o else:
%o kmin = kmid
%o return kmax
%o return max(int(abs(x[1][0][0])) for x in cyclotomic_poly(bisection(f)).as_terms()[0]) # _Chai Wah Wu_, Aug 31 2024
%Y See A278571 for smallest m such that a(m) = n.
%Y Cf. A007304, A013595, A160340, A262404, A262405.
%Y See A278570 for another version.
%K nonn
%O 1,7
%A _N. J. A. Sloane_, Nov 26 2016