[Question]
  [
In [this challenge](https://codegolf.stackexchange.com/q/50240/32700) 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](https://oeis.org/A014580).
XOR multiplication is defined as binary long multiplication without carrying. You can find more information about XOR multiplication in [xnor's challenge](https://codegolf.stackexchange.com/q/50240/32700).
## 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
```
  
[Answer]
# Pyth, 26 bytes
```
.fq2/muxyG*Hhdjed2 0^SZ2ZQ
```
[Demonstration](https://pyth.herokuapp.com/?code=.fq2%2FmuxyG%2aHhdjed2+0%5ESZ2ZQ&input=10&debug=0)
To test whether a number is a XOR-prime, we generate the complete multiplication table up to that number using the algorithm from [here](https://codegolf.stackexchange.com/a/50245/20080), and then count how many times that number appears. If it's exactly 2, the number is prime.
Then, `.f` returns the first n primes.
[Answer]
## Ceylon, 166 bytes
Of course this can't compete with Pyth & Co ...
```
{Integer*}p(Integer n)=>loop(2)(1.plus).filter((m)=>{for(i in 2:m-2)for(j in 2:m-2)if(m==[for(k in 0:64)if(j.get(k))i*2^k].fold(0)((y,z)=>y.xor(z)))i}.empty).take(n);
```
Formatted:
```
{Integer*} p(Integer n) =>
        loop(2)(1.plus).filter((m) => {
            for (i in 2 : m-2)
                for (j in 2 : m-2)
                    if (m == [
                            for (k in 0:64)
                                if (j.get(k))
                                    i * 2^k
                        ].fold(0)((y, z) => y.xor(z))) i
        }.empty).take(n);
```
This creates an infinite iterable of integers (starting with 2), filters it by checking if a number is an XOR-prime, and takes the first `n` elements of that.
This filtering works by looping over all elements from 2 to m-1 (which are m-2 ones), and checking each pair if the xor-product give `m`. If the iterable created by that is empty, `m` is an xor-prime, and therefore included.
The xor-product itself is calculated using the same algorithm (and almost the same code) as in [my answer for the XOR product calculation](https://codegolf.stackexchange.com/a/66942/2338).
[Answer]
# Mathematica, ~~100~~ 99 bytes
As noted by xnor, XOR multiplication is just multiplication in the polynomial ring \$\mathbb{F}\_2[x]\$. 
```
For[p=i=0,i<#,If[IrreduciblePolynomialQ[++p~IntegerDigits~2~FromDigits~x,Modulus->2],Print@p;i++]]&
```
[Answer]
# [Pari/GP](http://pari.math.u-bordeaux.fr/), 74 bytes
Saved 4 bytes thanks to [Charles](https://codegolf.stackexchange.com/users/2605/charles).
As noted by xnor, XOR multiplication is just multiplication in the polynomial ring \$\mathbb{F}\_2[x]\$.
```
n->p=0;while(n,if(polisirreducible(Mod(Pol(binary(p++)),2)),print(p);n--))
```
[Try it online!](https://tio.run/##JchLCoAwDADRq7hMsIXqVuoNBK/grxooaYiKePpacDGLNzIp2V1yqHyV2fbiXfccFDdgQwEkRTpJdVvvheZyh7TCmCLMxJO@IHWNaNqSKPEFgh1bi5h/BmicK/oA "Pari/GP – Try It Online")
Basically the same as [my Mathematica answer](https://codegolf.stackexchange.com/a/67005/9288), but PARI/GP has shorter function names.
[Answer]
# Julia, 116 bytes
```
f(a,b)=b%2*a$(b>0&&f(2a,b÷2))
n->(A=[i=2];while endof(A)<n i+=1;i∈[f(a,b)for a=2:i-1,b=2:i-1]||push!(A,i)end;A[n])
```
The primary function is the anonymous function on the second line. It calls a helper function `f` (which is incidentally my submission for xnor's challenge).
Ungolfed:
```
function xor_mult(a::Integer, b::Integer)
    return b % 2 * a $ (b > 0 && f(2a, b÷2))
end
function xor_prime(n::Integer)
    # Initialize an array to hold the generated XOR primes as well as
    # an index at which to start the search
    A = [i = 2]
    # Loop while we've generated fewer than n XOR primes
    while endof(A) < n
        # Increment the prime candidate
        i += 1
        # If the number does not appear in the XOR multiplication
        # table of all numbers from 2 to n-1, it's an XOR prime
        i ∈ [xor_mult(a, b) for a in 2:i-1, b in 2:i-1] || push!(A, i)
    end
    # Return the nth XOR prime
    return A[n]
end
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 21 bytes
```
BJ’2*U×B{×^/ðþFċ=2
ÇƇ
```
[Try it online!](https://tio.run/##ASsA1P9qZWxsef//QkrigJkyKlXDl0J7w5deL8Oww75GxIs9MgrDh8aH////MTAw "Jelly – Try It Online")
## How it works
```
ÇƇ - Main link. Takes an integer n on the left
 Ƈ - Yield the range [1, 2, ..., n] and filter on:
Ç  -   The helper function
BJ’2*U×B{×^/ðþFċ=2 - Help function. Takes an integer k on the left
            ð      - Define a dyadic link f(i, j):
B                  -   Convert i to binary
 J                 -   Replace with their indices
  ’                -   Decrement each
   2*              -   2 to the power of each
     U             -   Reverse
       B{          -   Yield i in binary
      ×            -   Multiply the powers by the bits
         ×         -   Multiply by j
          ^/       -   Reduce by XOR
             þ     - Yield the range [1, 2, ..., k] and create a multiplication table using f(i, j)
              F    - Flatten
               ċ   - Count the occurrences of k
                =2 - Does this equal 2?
```
[Answer]
# [R](https://www.r-project.org/), 138 bytes
```
function(n,f=function(x,y)`if`(y,bitwXor(x*y%%2,2*f(x,y%/%2)),0)){while(n)if(sum(outer(1:(T=T+1),1:T,Vectorize(f))==T)<3)F[1+(n=n-1)]=T;F}
```
[Try it online!](https://tio.run/##Vc5BCsIwEEDR0wRm2ogm4qY6254giCDSYklwwCaSpjRVPHvFjeDy8zY/Lr7JITaPyL0daHGj7xIHD146@kWWM7bsWpjlldN0ChFyMQuhpS7cV8VaaES5QXxNN75b8MgOhrGHMCYbQVVgyJQKpaqMPNouhchPCw6RyOBhi/VZleDJrxReyOzr998Y6B0uHw "R – Try It Online")
Outputs the first `n` XOR primes in reverse order.
Sequentially tests each integer `T` (starting at 2) for XOR primality by checking whether the results of all values of 1..`T` XOR multiplied (using [helper function `f`](https://codegolf.stackexchange.com/a/218243/95126)) by 1..`T` contain only 2 instances of `T`.
]