OFFSET
0,1
COMMENTS
We conjecture that all integers appear as a coefficient of a polynomial P_m(x).
This property is known to hold for the cyclotomic polynomials.
The conjecture holds for the first 10^5 positive integers, with a maximum on those integers of a(99852) = 1921. - David A. Corneth, Apr 08 2018
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..10000
Dorin Andrica and Ovidiu Bagdasar, On some results concerning the polygonal polynomials, Carpathian Journal of Mathematics (2019) Vol. 35, No. 1, 1-11.
Jiro Suzuki, On coefficients of cyclotomic polynomials, Proc. Japan Acad. Ser. A Math. Sci. 63:7 (1987), pp. 279-280.
EXAMPLE
We have:
P_1(x) = x-1, hence a(1)=1.
P_2(x) = (x-1)*(x^2-1) = x^3-x^2-x+1;
P_3(x) = (x-1)*(x^2-1)*(x^3-1) = x^6-x^5-x^4+x^2+x-1;
P_4(x) = (x-1)*(x^2-1)*(x^3-1)*(x^4-1) = x^10 - x^9 - x^8+2x^5-x^2-x+1, hence a(2)=4.
n=3 first appears as a coefficient of P_{10}(x).
MAPLE
T:= proc(n) option remember; [(p-> seq(coeff(p, x, i),
i=0..degree(p)))(expand(mul(1-x^i, i=1..n)))] end:
a:= proc(n) local k; for k while not n in T(k) do od: k end:
seq(a(n), n=0..70); # Alois P. Heinz, Mar 29 2019
MATHEMATICA
With[{s = Array[CoefficientList[Times @@ Array[x^# - 1 &, #], x] &, 40]}, TakeWhile[Array[FirstPosition[s, #][[1]] &, Max@ Map[Max, s]], IntegerQ]] (* Michael De Vlieger, Apr 05 2018 *)
PROG
(PARI) a(n) = {my(k=1); while (!vecsearch(vecsort(Vec(prod(j=1, k, x^j-1))), n), k++); k; } \\ Michel Marcus, Apr 08 2018
(PARI) first(n) = {my(pol = [1], res = vector(n), todo = n+1, t = 0); while(1, t++; for(i = 1, #pol, if(0 < pol[i] && pol[i] <=n, if(res[pol[i]] == 0, res[pol[i]] = t-1; todo--; if(todo == 0, return(concat([3], res)))))); pol = concat(pol, vector(t)) - concat(vector(t), pol))} \\ David A. Corneth, Apr 08 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Ovidiu Bagdasar, Mar 25 2018
EXTENSIONS
Offset changed to 0 by David A. Corneth, Apr 08 2018
STATUS
approved