March 2015 Fiendish Function

The Fiendish Function posed during March 2015 had the following sample guesses and replies:

  • GUESS
  • REPLY
  • 1
  • 1
  • 2
  • 2
  • 3
  • 3
  • 4
  • 3
  • 5
  • 4
  • 10
  • 7

The rule was: "Write the number in binary, write it in binary, then add the digits together".

Suppose the guess was 22:

  • Write the number in binary, giving 10110.
  • Write the number in binary, giving 10011101111110.
  • Find the number's digits, giving 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0
  • Add these together, giving 10.

So the result is 10.