 ## On the Subject of Simon Strokes

Sicko mode activated.

This module consists of nine buttons, six of which have the colours: (R)ed, (G)reen, (B)lue, (C)yan, (M)agenta, and (Y)ellow.

These buttons will flash in an increasing sequence, starting with the centre button, in which each flashing colour corresponds to an operator in the tables below.

Apply each operation successively until the end of the sequence and use the result to determine the sequence of coloured buttons to press for each stage.

If at any point a function yields-

• a value greater than 364, then subtract 365 from the value until it is less than 365.
• a value less than -364, then add 365 to the value until it is greater than -365.

### Section 1: Determining Initial Values

To determine the number to be entered into the sequence of operators, interpret the following pairs of digits in the serial number as two-digit base-36 numbers and take them modulo 365:

• For stage 1, a0 is obtained by using the 3rd and 4th digits.
• For stage 2, b0 is obtained by using the 5th and 6th digits.
• For stage 3, c0 is obtained by using the 1st and 2nd digits.

### Section 2: Operation Tables

• n is the current step of the sequence.
• D is the sum of the individual base-36 digits of the serial number.
n Stage 1 Stage 2 Stage 3 2/3 Colour Flashes
1 R R(x) = x + D R(x) = x + a0 + 1 R(x) = x + b0 - a0 2P
an
= max(P1(an-1), P2(an-1))
bn
= abs(P1(bn-1) - P2(bn-1))
cn
= P3(cn-1) + P3(bn-1)
+ P3(an-1)
G G(x) = x - D G(x) = 2x - a0 G(x) = x - 2b0
B B(x) = 2x - D B(x) = 2x - a0 - 4 B(x) = x + b0 - a3
C C(x) = -x + D - 8 C(x) = x + a1 C(x) = x - b0 + a0
M M(x) = -2x + 3 M(x) = x + a2 - D M(x) = x - 2a0
Y Y(x) = x + D - 6 Y(x) = x + a3 - a0 Y(x) = x + b4 - a0
2 R R(x) = x + D R(x) = x + a1 + 4 R(x) = x + b1 - a1 1P, 1S
an
= P(an-1) + S(an-1) - 2D
bn
= 4D - abs(P(bn-1) - S(bn-1))
cn
= min(P(cn-1), S(cn-1),
-abs(P(cn-1) - S(cn-1)))
G G(x) = x - D G(x) = 2x - a1 G(x) = x - 2b1
B B(x) = 2x - D B(x) = 2x - a0 - 16 B(x) = x + b0 - a3
C C(x) = -x + D - 16 C(x) = x + a1 C(x) = x - b1 + a1
M M(x) = -2x + 24 M(x) = x + a2 - D M(x) = x - 2a1
Y Y(x) = x + D - 12 Y(x) = x + a3 - a1 Y(x) = x + b4 - a0
3 R R(x) = x + D R(x) = x + a2 + 9 R(x) = x + b2 - a2 2S
an =
min(S1(an-1), S2(an-1))
bn =
max(S3(bn-1), S3(an-1))
cn =
S3(cn-1) - S1(cn-1) - S2(cn-1)
G G(x) = x - D G(x) = 2x - a2 G(x) = x - 2b2
B B(x) = 2x - D B(x) = 2x - a0 - 36 B(x) = x + b0 - a3
C C(x) = -x + D - 24 C(x) = x + a1 C(x) = x - b2 + a2
M M(x) = -2x + 81 M(x) = x + a2 - D M(x) = x - 2a2
Y Y(x) = x + D - 18 Y(x) = x + a3 - a2 Y(x) = x + b4 - a0
4 R (I have no idea
what to put
in here)
R(x) = x + a3 + 16 R(x) = x + b3 - a3 2P, 1S
an =
max(P1(an-1),P2(an-1), S(an-1))
bn =
bn-1 + P1(bn-1) + P2(bn-1)
- S(an-1)
cn =
P1(cn-1) + P2(cn-1) - S(bn-1)
- S(an-1)
G G(x) = 2x - a3 G(x) = x - 2b3
B B(x) = 2x - a0 - 64 B(x) = x + b0 - a3
C C(x) = x + a1 C(x) = x - b3 + a3
M M(x) = x + a2 - D M(x) = x - 2a3
Y Y(x) = x Y(x) = x + b4 - a0
5 R Override: 3P
an = an-1 + a0
bn = bn-1 + (bn-1 % 4)b0 - a3
cn = cn-1 + (cn-1 % 3)c0 - (bn-1 % 3)b0 + (an-1 % 3)a0
R(x) = x + b4 1P, 2S
an =
min(S1(an-1),S2(an-1), P(an-1))
bn =
bn-1 + S1(an-1) + S2(an-1)
- P(bn-1)
cn =
S1(cn-1) + S2(cn-1) - P(bn-1)
- P(an-1)
G G(x) = x - 2b4
B B(x) = x + b0 - a3
C Override: 3S
an = an-1 - a0
bn = bn-1 + (b0 % 4)bn-1 - a3
cn = cn-1 + (c0 % 3)cn-1 - (b0 % 3)bn-1 + (a0 % 3)an-1
C(x) = x - b4
M M(x) = x
Y Y(x) = x + b4 - a0

### Section 3: Converting Results

Once a result of the sequence of operations has been obtained, find the corresponding balanced ternary using Ctrl+F n=<value>

 `n=001` `+00000` `n=002` `-+0000` `n=003` `0+0000` `n=004` `++0000` `n=005` `--+000` `n=006` `0-+000` `n=007` `+-+000` `n=008` `-0+000` `n=009` `00+000` `n=010` `+0+000` `n=011` `-++000` `n=012` `0++000` `n=013` `+++000` `n=014` `---+00` `n=015` `0--+00` `n=016` `+--+00` `n=017` `-0-+00` `n=018` `00-+00` `n=019` `+0-+00` `n=020` `-+-+00` `n=021` `0+-+00` `n=022` `++-+00` `n=023` `--0+00` `n=024` `0-0+00` `n=025` `+-0+00` `n=026` `-00+00` `n=027` `000+00` `n=028` `+00+00` `n=029` `-+0+00` `n=030` `0+0+00` `n=031` `++0+00` `n=032` `--++00` `n=033` `0-++00` `n=034` `+-++00` `n=035` `-0++00` `n=036` `00++00` `n=037` `+0++00` `n=038` `-+++00` `n=039` `0+++00` `n=040` `++++00` `n=041` `----+0` `n=042` `0---+0` `n=043` `+---+0` `n=044` `-0--+0` `n=045` `00--+0` `n=046` `+0--+0` `n=047` `-+--+0` `n=048` `0+--+0` `n=049` `++--+0` `n=050` `--0-+0` `n=051` `0-0-+0` `n=052` `+-0-+0` `n=053` `-00-+0` `n=054` `000-+0` `n=055` `+00-+0` `n=056` `-+0-+0` `n=057` `0+0-+0` `n=058` `++0-+0` `n=059` `--+-+0` `n=060` `0-+-+0` `n=061` `+-+-+0` `n=062` `-0+-+0` `n=063` `00+-+0` `n=064` `+0+-+0` `n=065` `-++-+0` `n=066` `0++-+0` `n=067` `+++-+0` `n=068` `---0+0` `n=069` `0--0+0` `n=070` `+--0+0` `n=071` `-0-0+0` `n=072` `00-0+0` `n=073` `+0-0+0` `n=074` `-+-0+0` `n=075` `0+-0+0` `n=076` `++-0+0` `n=077` `--00+0` `n=078` `0-00+0` `n=079` `+-00+0` `n=080` `-000+0` `n=081` `0000+0` `n=082` `+000+0` `n=083` `-+00+0` `n=084` `0+00+0` `n=085` `++00+0` `n=086` `--+0+0` `n=087` `0-+0+0` `n=088` `+-+0+0` `n=089` `-0+0+0` `n=090` `00+0+0` `n=091` `+0+0+0` `n=092` `-++0+0` `n=093` `0++0+0` `n=094` `+++0+0` `n=095` `---++0` `n=096` `0--++0` `n=097` `+--++0` `n=098` `-0-++0` `n=099` `00-++0` `n=100` `+0-++0` `n=101` `-+-++0` `n=102` `0+-++0` `n=103` `++-++0` `n=104` `--0++0` `n=105` `0-0++0` `n=106` `+-0++0` `n=107` `-00++0` `n=108` `000++0` `n=109` `+00++0` `n=110` `-+0++0` `n=111` `0+0++0` `n=112` `++0++0` `n=113` `--+++0` `n=114` `0-+++0` `n=115` `+-+++0` `n=116` `-0+++0` `n=117` `00+++0` `n=118` `+0+++0` `n=119` `-++++0` `n=120` `0++++0` `n=121` `+++++0` `n=122` `-----+` `n=123` `0----+` `n=124` `+----+` `n=125` `-0---+` `n=126` `00---+` `n=127` `+0---+` `n=128` `-+---+` `n=129` `0+---+` `n=130` `++---+` `n=131` `--0--+` `n=132` `0-0--+` `n=133` `+-0--+` `n=134` `-00--+` `n=135` `000--+` `n=136` `+00--+` `n=137` `-+0--+` `n=138` `0+0--+` `n=139` `++0--+` `n=140` `--+--+` `n=141` `0-+--+` `n=142` `+-+--+` `n=143` `-0+--+` `n=144` `00+--+` `n=145` `+0+--+` `n=146` `-++--+` `n=147` `0++--+` `n=148` `+++--+` `n=149` `---0-+` `n=150` `0--0-+` `n=151` `+--0-+` `n=152` `-0-0-+` `n=153` `00-0-+` `n=154` `+0-0-+` `n=155` `-+-0-+` `n=156` `0+-0-+` `n=157` `++-0-+` `n=158` `--00-+` `n=159` `0-00-+` `n=160` `+-00-+` `n=161` `-000-+` `n=162` `0000-+` `n=163` `+000-+` `n=164` `-+00-+` `n=165` `0+00-+` `n=166` `++00-+` `n=167` `--+0-+` `n=168` `0-+0-+` `n=169` `+-+0-+` `n=170` `-0+0-+` `n=171` `00+0-+` `n=172` `+0+0-+` `n=173` `-++0-+` `n=174` `0++0-+` `n=175` `+++0-+` `n=176` `---+-+` `n=177` `0--+-+` `n=178` `+--+-+` `n=179` `-0-+-+` `n=180` `00-+-+` `n=181` `+0-+-+` `n=182` `-+-+-+` `n=183` `0+-+-+` `n=184` `++-+-+` `n=185` `--0+-+` `n=186` `0-0+-+` `n=187` `+-0+-+` `n=188` `-00+-+` `n=189` `000+-+` `n=190` `+00+-+` `n=191` `-+0+-+` `n=192` `0+0+-+` `n=193` `++0+-+` `n=194` `--++-+` `n=195` `0-++-+` `n=196` `+-++-+` `n=197` `-0++-+` `n=198` `00++-+` `n=199` `+0++-+` `n=200` `-+++-+` `n=201` `0+++-+` `n=202` `++++-+` `n=203` `----0+` `n=204` `0---0+` `n=205` `+---0+` `n=206` `-0--0+` `n=207` `00--0+` `n=208` `+0--0+` `n=209` `-+--0+` `n=210` `0+--0+`
 `n=211` `++--0+` `n=212` `--0-0+` `n=213` `0-0-0+` `n=214` `+-0-0+` `n=215` `-00-0+` `n=216` `000-0+` `n=217` `+00-0+` `n=218` `-+0-0+` `n=219` `0+0-0+` `n=220` `++0-0+` `n=221` `--+-0+` `n=222` `0-+-0+` `n=223` `+-+-0+` `n=224` `-0+-0+` `n=225` `00+-0+` `n=226` `+0+-0+` `n=227` `-++-0+` `n=228` `0++-0+` `n=229` `+++-0+` `n=230` `---00+` `n=231` `0--00+` `n=232` `+--00+` `n=233` `-0-00+` `n=234` `00-00+` `n=235` `+0-00+` `n=236` `-+-00+` `n=237` `0+-00+` `n=238` `++-00+` `n=239` `--000+` `n=240` `0-000+` `n=241` `+-000+` `n=242` `-0000+` `n=243` `00000+` `n=244` `+0000+` `n=245` `-+000+` `n=246` `0+000+` `n=247` `++000+` `n=248` `--+00+` `n=249` `0-+00+` `n=250` `+-+00+` `n=251` `-0+00+` `n=252` `00+00+` `n=253` `+0+00+` `n=254` `-++00+` `n=255` `0++00+` `n=256` `+++00+` `n=257` `---+0+` `n=258` `0--+0+` `n=259` `+--+0+` `n=260` `-0-+0+` `n=261` `00-+0+` `n=262` `+0-+0+` `n=263` `-+-+0+` `n=264` `0+-+0+` `n=265` `++-+0+` `n=266` `--0+0+` `n=267` `0-0+0+` `n=268` `+-0+0+` `n=269` `-00+0+` `n=270` `000+0+` `n=271` `+00+0+` `n=272` `-+0+0+` `n=273` `0+0+0+` `n=274` `++0+0+` `n=275` `--++0+` `n=276` `0-++0+` `n=277` `+-++0+` `n=278` `-0++0+` `n=279` `00++0+` `n=280` `+0++0+` `n=281` `-+++0+` `n=282` `0+++0+` `n=283` `++++0+` `n=284` `----++` `n=285` `0---++` `n=286` `+---++` `n=287` `-0--++` `n=288` `00--++` `n=289` `+0--++` `n=290` `-+--++` `n=291` `0+--++` `n=292` `++--++` `n=293` `--0-++` `n=294` `0-0-++` `n=295` `+-0-++` `n=296` `-00-++` `n=297` `000-++` `n=298` `+00-++` `n=299` `-+0-++` `n=300` `0+0-++` `n=301` `++0-++` `n=302` `--+-++` `n=303` `0-+-++` `n=304` `+-+-++` `n=305` `-0+-++` `n=306` `00+-++` `n=307` `+0+-++` `n=308` `-++-++` `n=309` `0++-++` `n=310` `+++-++` `n=311` `---0++` `n=312` `0--0++` `n=313` `+--0++` `n=314` `-0-0++` `n=315` `00-0++` `n=316` `+0-0++` `n=317` `-+-0++` `n=318` `0+-0++` `n=319` `++-0++` `n=320` `--00++` `n=321` `0-00++` `n=322` `+-00++` `n=323` `-000++` `n=324` `0000++` `n=325` `+000++` `n=326` `-+00++` `n=327` `0+00++` `n=328` `++00++` `n=329` `--+0++` `n=330` `0-+0++` `n=331` `+-+0++` `n=332` `-0+0++` `n=333` `00+0++` `n=334` `+0+0++` `n=335` `-++0++` `n=336` `0++0++` `n=337` `+++0++` `n=338` `---+++` `n=339` `0--+++` `n=340` `+--+++` `n=341` `-0-+++` `n=342` `00-+++` `n=343` `+0-+++` `n=344` `-+-+++` `n=345` `0+-+++` `n=346` `++-+++` `n=347` `--0+++` `n=348` `0-0+++` `n=349` `+-0+++` `n=350` `-00+++` `n=351` `000+++` `n=352` `+00+++` `n=353` `-+0+++` `n=354` `0+0+++` `n=355` `++0+++` `n=356` `--++++` `n=357` `0-++++` `n=358` `+-++++` `n=359` `-0++++` `n=360` `00++++` `n=361` `+0++++` `n=362` `-+++++` `n=363` `0+++++` `n=364` `++++++`

NOTE: The order given are in order of least to most significant.

### Section 4: Entry and Submission

To work out which buttons need to be pressed, first apply the list of conditions on the positions of buttons on the module to each row of the initial correspondences table, starting from the top of the list and working down.

The sequence in each row refers to sequence after modification if the rule is the first applied rule.

Initial Correspondences 30 31 32 33 34 35
Stage 1 R G B C M Y
Stage 2 Y B G M C R
Stage 3 B M R Y G C

 If... ..., then... the top right button is yellow cycle each colour one space to the right.`YRGBCM RYBGMC CBMRYG` the red button is diametrically opposite the cyan button swap each colour with its complementary (R ↔ C, G ↔ M, B ↔ Y).`CMYRGB BYMGRC YGCBMR` the green button is adjacent to the white button cycle the primary colours(R → G, G → B, B → R).`GBRCMY YRBMCG RMGYBC` the magenta button is adjacent to the black button cycle the secondary colours(C → M, M → Y, Y → C).`RGBMYC CBGYMR BYRCGM` the blue and yellow buttons are on the same side of the module swap B with the colour opposite in the sequence.`RGCBMY YCGMBR CMRYGB` the red button is on the right side of the module swap R and Y.`YGBCMR RBGMCY BMYRGC` the blue button is on the left side of the module swap G and C.`RCBGMY YBCMGR BMRYCG`

Once a balanced ternary number and the buttons corresponding to powers of 3 for the current stage have both been determined, follow the instructions below:

1. Press the centre button. This will cause the sequence to stop flashing and light the white button.
2. Using the coloured buttons, enter the non-zero balanced ternary digits in order of least to most significant:
• Pressing the white and black buttons will toggle which of the two are lit.
• Pressing a coloured button while the white button is lit will enter a ‘+1’ in the corresponding digit.
• Pressing a coloured button while the black button is lit will enter a ‘-1’ in the corresponding digit.
3. Press the centre button again to submit the sequence of inputs.

Submitting the correct sequence of inputs will advance the module to the next stage.

Submitting an incorrect balanced ternary number, or submitting the coloured buttons in the wrong order will result in a strike.