login
a(n) is the smallest positive integer m, with the property that n appears as a coefficient in the polynomial P_m(x) = (x-1)(x^2-1)...(x^m-1).
1

%I #42 Aug 02 2024 02:52:21

%S 3,1,4,10,12,17,16,19,20,22,22,23,24,25,25,25,24,26,26,28,27,27,29,28,

%T 28,29,29,30,28,29,30,30,30,30,30,31,31,31,31,31,31,31,32,33,33,33,32,

%U 33,32,33,32,33,33,36,35,33,33,36,34,34,37,35,34,37,35,34,34,35,35,35,35

%N a(n) is the smallest positive integer m, with the property that n appears as a coefficient in the polynomial P_m(x) = (x-1)(x^2-1)...(x^m-1).

%C We conjecture that all integers appear as a coefficient of a polynomial P_m(x).

%C This property is known to hold for the cyclotomic polynomials.

%C 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

%H Seiichi Manyama, <a href="/A301701/b301701.txt">Table of n, a(n) for n = 0..10000</a>

%H Dorin Andrica and Ovidiu Bagdasar, <a href="https://doi.org/10.37193/CJM.2019.01.01">On some results concerning the polygonal polynomials</a>, Carpathian Journal of Mathematics (2019) Vol. 35, No. 1, 1-11.

%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.

%e We have:

%e P_1(x) = x-1, hence a(1)=1.

%e P_2(x) = (x-1)*(x^2-1) = x^3-x^2-x+1;

%e P_3(x) = (x-1)*(x^2-1)*(x^3-1) = x^6-x^5-x^4+x^2+x-1;

%e 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.

%e n=3 first appears as a coefficient of P_{10}(x).

%p T:= proc(n) option remember; [(p-> seq(coeff(p, x, i),

%p i=0..degree(p)))(expand(mul(1-x^i, i=1..n)))] end:

%p a:= proc(n) local k; for k while not n in T(k) do od: k end:

%p seq(a(n), n=0..70); # _Alois P. Heinz_, Mar 29 2019

%t 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 *)

%o (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

%o (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

%Y Cf. A231599: a(n) is the index of the first row m containing number n.

%K nonn

%O 0,1

%A _Ovidiu Bagdasar_, Mar 25 2018

%E Offset changed to 0 by _David A. Corneth_, Apr 08 2018