Fill in the correct number in this sequence:

5 3 8 9 1 27 ?

The options are: 18, 54, 38, 14 or 13.

I can see the pattern of 3, 9, 27 but other than that I am clueless.

Source: an IQ-test.

put on hold as off-topic by JonMark Perry, Peregrine Rook, w l, boboquack, Glorfindel 25 mins ago

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This looks like a puzzle you found elsewhere. For content you did not create yourself, proper attribution is required. If you have permission to repost this, please edit to include (at minimum) where it came from, then vote to reopen. Posts which use someone else's content without attribution are generally deleted." – JonMark Perry, Peregrine Rook, w l, boboquack, Glorfindel
If this question can be reworded to fit the rules in the help center, please edit the question.