← RoseCode

ROSECODE 393

Maximize XOR

Philippe_57721 · Programming ·

Let 2k≤p<q≤2k+1−1

We are looking for pairs (p,q) such as
∙p⊗q is maximal // ⊗ is the XOR operator.
∙p,q are both either a prime or a square number

How many such pairs are there for k = 26 ?

Answer format: count,first p,first q

Example: 3,1307,1764 for k = 10

[My timing: 42 sec]