## On the Subject of The Pentabutton

Oh look, Alchemy's "Meta" symbol has its own module now!

This module presents a pentagonal button and a pentagonal base, which lights a certain colour when the button is held. The button will be labelled with a word. To solve the module, you must press and release the button at certain times. Pressing or releasing the button at an incorrect time will cause a strike upon releasing it.

### Determining Correct Hold Times

Follow these rules in the order they are listed. With N being an integer and being equal to 1, perform any actions that apply:

- If the label is "PRESS", add the first digit of the serial number to N.
- If the label is "PENTA", add the last digit of the serial number to N.
- If the label is "PUNCH", add the sum of the digits in the serial number to N.
- If the last digit of the serial number is odd, add 2 to N.
- If N is even, divide it by 2. Otherwise, add 5 to N.
- If the amount of batteries is a prime number, add it to N. Otherwise, subtract it from N.
- If the label is 6 or more characters long, double N and subtract the amount of characters in the label.
- If N is odd, add 4 to N.
- If N is divisible by 3, add 3 to N.

After the above rules, add/subtract 10 until N is a single digit number. The button should be held when the last digit of the bomb's timer is equal to N.

### Determining Correct Release Times

Refer to the table below to modify X, with X being an integer and being equal to the last digit of the serial number. Subtract 10 until X is a single digit number. The button should be released when the last digit of the bomb's timer is equal to X.

Base colour | |||||
---|---|---|---|---|---|

Red/Orange | Yellow | Green | Blue/Purple | White | |

Label is 6 or more characters long | +7 | +3 | +0 | +8 | +4 |

Otherwise | +1 | +5 | +2 | +6 | +9 |