Good job, k-man. I'm very impressed that you solved this problem. Would you mind sharing your thought process when approaching this problem? What sort of test did you run on the examples? How did you narrow down the possible solutions, and what was the insight that allowed you to crack the code? Again, great job!
It was probably more luck than anything else. From several examples I noticed that the operation may create a result that's greater, in between or smaller than the operands. That made me thinking of some sort of binary nature of the operation (similar to binary OR, AND or XOR). So, for a while, I've been using the binary representation of the numbers trying unsuccessfuly to figure out the binary operation that would produce these results. That made me think that some other numerical system may be involved. So, I just decided to try the base 3 system. Once I converted the numbers to base 3 it became quite obvious what the operation does.