May 2016 Fiendish Function

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

  • GUESS
  • REPLY
  • 1
  • 3
  • 2
  • 23
  • 3
  • 17
  • 4
  • 5
  • 5
  • 7
  • 10
  • 337

The rule was: "Write the number followed by the next number, then take the largest prime divisor".

Suppose the guess was 11:

  • Write it followed by the next number, giving 1112.
  • Find the number's largest prime divisor, giving 139.

So the result is 139.