OFFSET
1,1
COMMENTS
If a binary polynomial P of degree n is irreducible, then demonstrably P divides the polynomial X^(2^n-1)+1.
All irreducible polynomials A014580 pass this test, requiring O(n^3) bit operations and O(n) bits with classical algorithms.
Polynomials which pass this test but are not irreducible form the sequence.
Analog for GF(2)[X] of Fermat pseudoprimes A001567.
When P includes the constant term 1 (as all primitive polynomials do), the test is equivalent to X^(2^n)=X(mod P), which is easier to compute.
LINKS
Francois R. Grieu, Test of irreducibility of a binary polynomial, Math StackExchange July 2018.
EXAMPLE
83, that is 1010011 in binary, represents the polynomial P(X)=X^6+X^4+X+1 of degree n=6. It is in the sequence because X^63+1 == 0 (mod P), and P is reducible since P(X)=(X+1)(X^2+X+1)(X^3+X+1) in GF(2)[X].
MATHEMATICA
For[p=3, p<5449, p+=2, P=0; Y=1; m=p; While[m>0, If[OddQ[m], P+=Y; m-=1]; Y*=x; m/=2]; If[PolynomialRemainder[x^(2^Exponent[P, x]-1), P, x, Modulus->2]==1&&!IrreduciblePolynomialQ[P, Modulus->2], Print[p]]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Francois R. Grieu, Jul 17 2018
STATUS
approved