OFFSET
1,1
COMMENTS
The successive intervals (2^i +1 .. 2^(i+1) -1) are also (A000051(i)..A000225(i)). The value 2^i -2 XORed with the primes p in each interval is A000918(i). for i=1,2,3...
The program provided produces output with primes in the successive intervals delimited by ****. For each interval, primes in the left half of interval are read from the top down, the right half of the interval primes from the bottom up.
PROG
(Magma)
XOR := func<a, b | Seqint([ (adigs[i] + bdigs[i]) mod 2 : i in [1..n]], 2)
where adigs := Intseq(a, 2, n)
where bdigs := Intseq(b, 2, n)
where n := 1 + Ilog2(Max([a, b, 1]))>;
for i in [2 .. 12] do
xornum:=2^(i)-2;
for j := 2^(i) +1 to 3*2^(i-1) by 2 do
xorcouple:=XOR(j, xornum);
if (IsPrime(j) and not(IsPrime(xorcouple))) then j;
end if;
if (not(IsPrime(j)) and IsPrime(xorcouple)) then " ", xorcouple;
end if;
end for;
"****";
end for;
CROSSREFS
KEYWORD
nonn
AUTHOR
Brad Clardy, Nov 04 2011
STATUS
approved