login
A171810
Let a(0) = 1. a(n) is the least k>0 such that k*x^n + Sum_{i=0..n-1} a(i)*x^i is an irreducible polynomial.
2
1, 1, 1, 2, 2, 3, 1, 2, 1, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 3, 1, 1, 2, 1, 2, 1, 2, 1, 1, 3, 1, 1, 1
OFFSET
0,4
COMMENTS
The program given generates the polynomial coefficients beginning with constant term 1. The cross-referenced A171811 gives the gap-length between nonunit entries, and A171812 gives the degrees that hold coefficients other than 1 and 2, only one of which is not 3.
Is a(n) = 1 for almost all n, that is, does a(n) = 1 with probability 1? - Charles R Greathouse IV, Jul 13 2013
EXAMPLE
The sequence of polynomials starts 1, x+1, x^2+x+1, 2x^3+x^2+x+1, 2x^4+2x^3+x^2+x+1, 3x^5+2x^4+2x^3+x^2+x+1, ... .
The value for the x^5 term is determined by the fact that 1 in its place yields factor x+1 and 2 in its place yields factor x^2+x+1.
MATHEMATICA
a[0] = 1; a[n_] := a[n] = Block[{k = 1}, While[! IrreduciblePolynomialQ[k x^n + Sum[a[i] x^i, {i, 0, n - 1}]], k++]; k]; Table[a@ n, {n, 0, 104}] (* Michael De Vlieger, Dec 10 2015 *)
PROG
(PARI) x=1; for(d=1, 1000, x+=v^d; c=1; while(!polisirreducible(x), c++; x+=v^d; next); print1(c", "))
CROSSREFS
Sequence in context: A241815 A051521 A319562 * A330155 A327759 A269978
KEYWORD
nonn
AUTHOR
James G. Merickel, Dec 19 2009
STATUS
approved