login
Numbers matching polynomials y(k,x) that have x as a factor; see Comments.
5

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

%S 2,4,6,9,11,13,15,17,20,22,24,26,28,30,32,34,36,38,40,43,45,47,49,51,

%T 53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,90,92,94,96,98,

%U 100,102,104,106,108,110,112,114,116,118,120,122,124,126,128

%N Numbers matching polynomials y(k,x) that have x as a factor; see Comments.

%C The polynomials y(k,x) range through all monic polynomials with coefficients in {-1,0,1}, ordered as at A206821.

%e The first 13 polynomials:

%e 1 .... 1

%e 2 .... x

%e 3 .... x + 1

%e 4 .... x^2

%e 5 .... x^2 - 1

%e 6 .... x^2 - x

%e 7 .... x^2 - x - 1

%e 8 .... x^2 + 1

%e 9 .... x^2 + x

%e 10 ... x^2 + x + 1

%e 11 ... x^3

%e 12 ... x^3 - 1

%e 13 ... x^3 - x

%e The list exemplifies these sequences:

%e A207187 (multiples of x + 1): 3,5,9,13,...

%e A207188 (multiples of x): 2,4,6,9,11,13,...

%e A207189 (multiples of x - 1): 5,6,12,13,...

%e A207190 (multiples of x^2 + 1): 8,20,25,27,...

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

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

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

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

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

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

%t Table[y[[n]] /. x -> -1, {n, 1, 300}];

%t Flatten[Position[%, 0]] (* A207187 *)

%t Table[y[[n]] /. x -> 0, {n, 1, 300}] ;

%t Flatten[Position[%, 0]] (* A207188 *)

%t Table[y[[n]] /. x -> 1, {n, 1, 1200}] ;

%t Flatten[Position[%, 0]] (* A207189 *)

%t Table[y[[n]] /. x -> I, {n, 1, 600}] ;

%t Flatten[Position[%, 0]] (* A207190 *)

%Y Cf. A206821.

%K nonn

%O 1,1

%A _Clark Kimberling_, Feb 16 2012