## October 2017 Fiendish Function

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

- 1
- 0
- 2
- 5
- 3
- 21
- 4
- 45
- 5
- 117
- 10
- 837

The rule was: "The nth prime, square it, then subtract four".

Suppose the guess was 11:

- Find the eleventh prime, giving 31.
- Multiply the number by itself, giving 961.
- Subtract four, giving 957.

So the result is 957.

## Earlier answers

Here are the answers to the Fiendish Functions posted in earlier months: