In this challenge posed by xnor, we were asked to implement XOR multiplication. In this challenge the goal is to find the first n
XOR primes. XOR primes are very similar to regular primes as you can see by the following definitions:
Definition of Prime Number: A positive number greater than 1 which cannot be formed through multiplication of two numbers except through the multiplication of 1 and itself.
Definition of XOR Prime: A positive number greater than 1 which cannot be formed through XOR multiplication of two numbers except through the XOR multiplication of 1 and itself. Note that the XOR primes compose oeis sequence A014580.
XOR multiplication is defined as binary long multiplication without carrying. You can find more information about XOR multiplication in xnor's challenge.
Input:
An integer n
.
Output:
The first n
XOR primes.
Here are the XOR primes under 500:
2 3 7 11 13 19 25 31 37 41 47 55 59 61 67 73 87 91 97 103 109 115 117 131 137 143 145 157 167 171 185 191 193 203 211 213 229 239 241 247 253 283 285 299 301 313 319 333 351 355 357 361 369 375 379 391 395 397 415 419 425 433 445 451 463 471 477 487 499
F_2[x]
. \$\endgroup\$