December 2017 Fiendish Function

The Fiendish Function posed during December 2017 had the following sample guesses and replies:

  • GUESS
  • REPLY
  • 1
  • 2
  • 2
  • 101
  • 3
  • 122
  • 4
  • 10001
  • 5
  • 10202
  • 10
  • 1020101

The rule was: "Write the number in binary, square it, then add one".

Suppose the guess was 26:

  • Write the number in binary, giving 11010.
  • Multiply the number by itself, giving 121220100.
  • Add one, giving 121220101.

So the result is 121220101.