login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Number of distinct irreducible factors of the polynomial y(n,x) defined at A206821.
2

%I #7 Mar 30 2012 18:58:12

%S 0,1,1,1,2,2,1,1,2,1,1,2,3,1,2,1,2,1,2,2,1,2,1,2,2,1,3,3,1,3,1,2,2,2,

%T 1,2,2,2,2,2,1,1,3,1,2,2,2,1,2,1,2,2,2,1,3,1,1,2,4,1,3,1,2,2,3,1,2,2,

%U 2,1,3,1,2,2,2,1,2,1,3,1,2,1,3,1,2,1,2,1,2,2,2,3,1,2,2,2,1,3,1

%N Number of distinct irreducible factors of the polynomial y(n,x) defined at A206821.

%C The first 6 polynomials: 1, x, 1+x, x^2, x^2-1, x^2-x, representing an ordering of the monic polynomials having coefficients in {-1,0,1}; see A206821.

%e y(5,x) = (x-1)(x+1), so a(5)=2.

%t t = Table[IntegerDigits[n, 2], {n, 1, 1000}];

%t b[n_] := Reverse[Table[x^k, {k, 0, n}]]

%t p[n_] := p[n] = t[[n]].b[-1 + Length[t[[n]]]]

%t TableForm[Table[{n, p[n], Factor[p[n]]}, {n, 1, 6}]]

%t f[k_] := 2^k - k; g[k_] := 2^k - 2 + f[k - 1];

%t q1[n_] := p[2^(k - 1)] - p[n + 1 - f[k]]

%t q2[n_] := p[n - f[k] + 2]

%t y1 = Table[p[n], {n, 1, 4}];

%t Do[AppendTo[y1, Join[Table[q1[n], {n, f[k], g[k] - 1}],

%t Table[q2[n], {n, g[k], f[k + 1] - 1}]]], {k, 3, 8}]

%t y = Flatten[y1]; (* polynomials over {-1,0,1} *)

%t TableForm[Table[{n, y[[n]], Factor[y[[n]]]}, {n, 1, 10}]]

%t Table[-1 + Length[FactorList[y[[n]]]],

%t {n, 1, 120}] (* A206829 *)

%Y Cf. A206821.

%K nonn

%O 1,5

%A _Clark Kimberling_, Feb 12 2012