← Complete problem index

PROJECT EULER · #0810

XOR-Primes

Statement only · SolvedOriginal problem ↗

We use xy for the bitwise XOR of x and y.

Define the XOR-product of x and y, denoted by xy, similar to a long multiplication in base 2, except that the intermediate results are XORed instead of the usual integer addition.

For example, 73=9, or in base 2, 1112112=10012:

11111121111112111111211111291110012

An XOR-prime is an integer n greater than 1 that is not an XOR-product of two integers greater than 1. The above example shows that 9 is not an XOR-prime. Similarly, 5=33 is not an XOR-prime. The first few XOR-primes are 2,3,7,11,13,... and the 10th XOR-prime is 41.

Find the 5000000th XOR-prime.

Write-up coming later

The complete problem is available here. An approach, code, and answer will be added later.