May 2018 Fiendish Function

The Fiendish Function posed during May 2018 had the following sample guesses and replies:

  • GUESS
  • REPLY
  • 1
  • 1
  • 2
  • 6
  • 3
  • 7
  • 4
  • 52
  • 5
  • 53
  • 10
  • 510

The rule was: "Write the number in binary, add the original number, then divide it by two (ignoring the remainder)".

Suppose the guess was 26:

  • Write the number in binary, giving 11010.
  • Add the original number, giving 11036.
  • Divide it by two (ignoring the remainder), giving 5518.

So the result is 5518.