INCREASE F # F = 1 to print 1 once at the end INCREASE I # Number of iterations to fake recursion INCREASE I INCREASE I INCREASE J INCREASE J REPEAT I TIMES ( REPEAT J TIMES ( REPEAT I TIMES ( INCREASE I ) ) ) # I = 192 (~>180 max length) REPEAT I TIMES ( # Repeat enough times for X to reach 1, but not too many # Goal: Execute the following part only when X > 1 REPEAT F TIMES ( CLEAR A # Pre-clear A - new X # Goal: Do if X does not equal 1 # via E = 1 CLEAR B CLEAR C CLEAR D # CLEAR E INCREASE D INCREASE B REPEAT X TIMES ( REPEAT C TIMES ( CLEAR C # Skip this block next turn CLEAR D # X != 1 and we set D = 0 CLEAR E # E max at 1 INCREASE E INCREASE T # Increasing T instead of B to skip next block INCREASE A # Pre-calculate X / 2 ) REPEAT B TIMES ( INCREASE C CLEAR B # Skip this block next turn ) REPEAT T TIMES ( INCREASE B # Now we increase B we postponed earlier CLEAR T ) ) # Now: E = 1 if X > 1 # D = 1 if X = 1 # B = 1 if X is even, else B = 0 # C = 1 if X is odd, else C = 0 REPEAT D TIMES ( CLEAR F # Clear when we're done (X = 1) ) PRINT X # Print current X CLEAR X # goal: A = X / 2 REPEAT B TIMES ( REPEAT A TIMES ( INCREASE X ) ) # goal: X = A * 6 + 4 REPEAT C TIMES ( # knowledge: X = 0, J = 2, A = X / 2 INCREASE X INCREASE X INCREASE X REPEAT X TIMES ( REPEAT J TIMES ( REPEAT A TIMES ( INCREASE X ) ) ) INCREASE X ) ) )