OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Antti Karttunen, Scheme-program for computing this sequence.
MAPLE
filter:= proc(p) local L, i, x;
L:= convert(p, base, 2);
Irreduc(add(L[i]*x^(i-1), i=1..nops(L))) mod 2
end proc:
select(t -> filter(ithprime(t)), [$1..300]); # Robert Israel, Jun 12 2018
MATHEMATICA
okQ[p_] := PrimeQ[p] && Module[{id, pol}, id = IntegerDigits[p, 2] // Reverse; pol = id.x^Range[0, Length[id] - 1]; IrreduciblePolynomialQ[pol, Modulus -> 2]];
Select[Range[300], okQ[Prime[#]]&] (* Jean-François Alcover, Feb 07 2023 *)
PROG
(PARI) isok(n) = polisirreducible(Mod(1, 2)*Pol(binary(prime(n)))); \\ Michel Marcus, Jun 13 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 03 2004
STATUS
approved