Skip to main content
3 of 7
added 69 characters in body
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241

#Japt, 29 11 bytes

Uo ®¤¬r@X^Y 

Try it online!

The OP said:

If you like, you can also add a separator.

So to save about 4 bytes, I use a separator of ,, which is automatically inserted, since the output is an array.

###Ungolfed and explanation

Uo mZ{Zs2 q rXY{X^Y}} // Implicit: U = input number Uo // Create an array of integers in the range `[0, U)`. mZ{Zs2 // Map each item Z in this range to Z.toString(2), q rXY{ // split into chars, and reduced by X^Y}} // XORing. // This returns (number of 1s in the binary string) % 2. // Implicit: output last expression 
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241