OFFSET
1,1
COMMENTS
The polynomials having coefficients in {0,1} are enumerated as in A206074. The sequence A206717 shows the numbers of those satisfying p(n,r)=0, where r=(-1+i*sqrt(3))/2. Is every term divisible by 7?
Yes, because if p(n,x) is divisible by p(7,x) = 1 + x + x^2, then n = p(n,2) is divisible by p(7,2) = 7. Similarly, A000120(n) is divisible by 3, because A000120(n) = p(n,1) must be divisible by p(7,1) = 3. The least n such that n is divisible by 7 and A000120(n) is divisible by 3 but n is not in the sequence is 4683. - Robert Israel, Nov 03 2014
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
p(7,x) = 1 + x + x^2.
p(14,x) = x + x^2 + x^3.
MAPLE
filter:= proc(n) local L, P, x;
L:= convert(n, base, 2);
P:= add(L[i]*x^(i-1), i=1..nops(L));
rem(P, x^2+x+1, x) = 0
end proc:
select(filter, 7*[$1..500]); # Robert Israel, Nov 03 2014
MATHEMATICA
t = Table[IntegerDigits[n, 2], {n, 1, 3000}];
b[n_] := Reverse[Table[x^k, {k, 0, n}]]
p[n_, x_] := p[n, x] = t[[n]].b[-1 + Length[t[[n]]]]
TableForm[Table[{n, p[n, x], Factor[p[n, x]]},
{n, 1, 16}]]
u = {}; Do[n++; If[Simplify[(p[n, x] /. x -> (-1 + I*Sqrt[3])/2) == 0], AppendTo[u, n]], {n, 800}]
u (* A206717 *)
u/7 (* A206718 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Feb 11 2012
STATUS
approved