810:XOR素数

ここでは xxyy のビットごとの排他的論理和(XOR)を xyx \oplus y と表す。

xxyyXOR積を、基数2の積み算による乗算と同様であるが、中間結果を通常の整数の加算の代わりにXORするものと定義し、xyx \otimes y と表す。

例えば、73=97 \otimes 3 = 9もしくは2進表記で 1112112=10012111_2 \otimes 11_2 = 1001_2 である:

11111121111112111111211111291110012\begin{align*} \phantom{\otimes 111} 111_2 \\ \otimes \phantom{1111} 11_2 \\ \hline \phantom{\otimes 111} 111_2 \\ \oplus \phantom{11} 111_2 \phantom{9} \\ \hline \phantom{\otimes 11} 1001_2 \\ \end{align*}

XOR素数とは、1より大きい整数 nn で、1より大きい二つの整数のXOR積ではないものをいう。 上の例は9がXOR素数でないことを示している。 同様に、5=335 = 3 \otimes 3 はXOR素数でない。 XOR素数は小さいものから順に 2,3,7,11,13,2, 3, 7, 11, 13, \dots で、10個めのXOR素数は41である。

50000005\,000\,000個めのXOR素数を答えよ。

最終更新