4 deleted 11 characters in body

# 05AB1E, 21201918bytes

ÎFDˆ∞ÎFˆ∞.Δ¯θy^bSO¯yå_*


Pretty inefficient, so the larger the input, the longer it takes to get the result. Does work for input 0 as well, though.

Explanation:

Î                # Push 0 and the input
F               # Loop the input amount of times:
Dˆˆ              #  AddPop the current number and add it to the global_array (without popping)
∞.Δ            #   Inner loop starting at 1 to find the first number which is truthy for:
¯θy^        #    XOR the last number of the global_array with the loop-number y
b       #    Convert it to binary
SO     #    Sum it's binary digits
¯yå_        #    Check if the loop-number y is NOT in the global_array yet
*    #    Multiply both (only if this is 1 (truthy), the inner loop will stop)
# (after the loops, output the top of the stack implicitly)


# 05AB1E, 212019bytes

ÎFDˆ∞.Δ¯θy^bSO¯yå_*


Pretty inefficient, so the larger the input, the longer it takes to get the result. Does work for input 0 as well, though.

Explanation:

Î                # Push 0 and the input
F               # Loop the input amount of times:
Dˆ             #  Add the current number to the global_array (without popping)
∞.Δ            #   Inner loop starting at 1 to find the first number which is truthy for:
¯θy^        #    XOR the last number of the global_array with the loop-number
b       #    Convert it to binary
SO     #    Sum it's binary digits
¯yå_        #    Check if the loop-number is NOT in the global_array yet
*    #    Multiply both (only if this is 1 (truthy) the inner loop will stop)
# (after the loops, output the top of the stack implicitly)


# 05AB1E, 212018bytes

ÎFˆ∞.Δ¯θy^bSO¯yå_*


Pretty inefficient, so the larger the input, the longer it takes to get the result. Does work for input 0 as well, though.

Explanation:

Î                # Push 0 and the input
F               # Loop the input amount of times:
ˆ              #  Pop the current number and add it to the global_array
∞.Δ            #  Inner loop starting at 1 to find the first number which is truthy for:
¯θy^        #   XOR the last number of the global_array with the loop-number y
b       #   Convert it to binary
SO     #   Sum it's binary digits
¯yå_        #   Check if the loop-number y is NOT in the global_array yet
*    #   Multiply both (only if this is 1 (truthy), the inner loop will stop)
# (after the loops, output the top of the stack implicitly)

3 added 846 characters in body

# 05AB1E, 212020 19bytes

ÎF©∞ÎFDˆ∞.Δ®y^bSO¯yå_*}DˆΔ¯θy^bSO¯yå_*


Can definitely be golfed some more..

Pretty inefficient, so the larger the input, the longer it takes to get the result. Does work for input 0 as well, though.

Explanation:

Î                # Push 0 and the input
F               # Loop the input amount of times:
© Dˆ             #  StoreAdd the current number into the registerglobal_array (without popping)
∞.Δ            #   Inner loop starting at 1 to find the first number which is truthy for:
®y^¯θy^        #    XOR the last number (fromof the register)global_array andwith the loop-number
b       #    Convert it to binary
SO     #    Sum it's binary digits
¯yå_        #    Check if the loop-number is notNOT in the global_array yet
*    #    Multiply both (only if this is 1 (truthy) the inner loop will stop)
}D  #  After the inner loop: duplicate the found number
ˆ #  And pop and push it to the global_array
# (after the outer looploops, output the top of the stack implicitly)


# 05AB1E, 2120bytes

ÎF©∞.Δ®y^bSO¯yå_*}Dˆ


Can definitely be golfed some more..

Pretty inefficient, so the larger the input, the longer it takes to get the result.

Explanation:

Î                # Push 0 and the input
F               # Loop the input amount of times:
©              #  Store the current number in the register (without popping)
∞.Δ           #   Inner loop starting at 1 to find the first number which is truthy for:
®y^        #    XOR the last number (from the register) and loop-number
b       #    Convert it to binary
SO     #    Sum it's binary digits
¯yå_       #    Check if the loop-number is not in the global_array yet
*    #    Multiply both (only if this is 1 (truthy) the loop will stop)
}D  #  After the inner loop: duplicate the found number
ˆ #  And pop and push it to the global_array
# (after the outer loop, output the top of the stack implicitly)


# 05AB1E, 2120 19bytes

ÎFDˆ∞.Δ¯θy^bSO¯yå_*


Pretty inefficient, so the larger the input, the longer it takes to get the result. Does work for input 0 as well, though.

Explanation:

Î                # Push 0 and the input
F               # Loop the input amount of times:
Dˆ             #  Add the current number to the global_array (without popping)
∞.Δ            #   Inner loop starting at 1 to find the first number which is truthy for:
¯θy^        #    XOR the last number of the global_array with the loop-number
b       #    Convert it to binary
SO     #    Sum it's binary digits
¯yå_        #    Check if the loop-number is NOT in the global_array yet
*    #    Multiply both (only if this is 1 (truthy) the inner loop will stop)
# (after the loops, output the top of the stack implicitly)

2 added 846 characters in body

# 05AB1E, 2121 20 bytes

0ˆF∞ÎF©∞.Δ¯θy^bSO¯yå_*Δ®y^bSO¯yå_*}Dˆ


Try it online Can definitely be golfed some more..

Pretty inefficient, so the larger the input, the longer it takes to get the result.

Explanation:

TODO: Will golf it some more (and have my meeting at work first), and add an explanation later on.

Î                # Push 0 and the input
F               # Loop the input amount of times:
©              #  Store the current number in the register (without popping)
∞.Δ           #   Inner loop starting at 1 to find the first number which is truthy for:
®y^        #    XOR the last number (from the register) and loop-number
b       #    Convert it to binary
SO     #    Sum it's binary digits
¯yå_       #    Check if the loop-number is not in the global_array yet
*    #    Multiply both (only if this is 1 (truthy) the loop will stop)
}D  #  After the inner loop: duplicate the found number
ˆ #  And pop and push it to the global_array
# (after the outer loop, output the top of the stack implicitly)


# 05AB1E, 21bytes

0ˆF∞.Δ¯θy^bSO¯yå_*}Dˆ


Explanation:

TODO: Will golf it some more (and have my meeting at work first), and add an explanation later on.

# 05AB1E, 21 20 bytes

ÎF©∞.Δ®y^bSO¯yå_*}Dˆ


Can definitely be golfed some more..

Pretty inefficient, so the larger the input, the longer it takes to get the result.

Explanation:

Î                # Push 0 and the input
F               # Loop the input amount of times:
©              #  Store the current number in the register (without popping)
∞.Δ           #   Inner loop starting at 1 to find the first number which is truthy for:
®y^        #    XOR the last number (from the register) and loop-number
b       #    Convert it to binary
SO     #    Sum it's binary digits
¯yå_       #    Check if the loop-number is not in the global_array yet
*    #    Multiply both (only if this is 1 (truthy) the loop will stop)
}D  #  After the inner loop: duplicate the found number
ˆ #  And pop and push it to the global_array
# (after the outer loop, output the top of the stack implicitly)

1