# Commands: # CLEAR X # INCREASE X # PRINT X # REPEAT X TIMES ( ... ) # Longest Collatz conjecture: 113 (somewhere) # Max amount to A (unpacked; currently 113) INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A INCREASE A PRINT X # Start the conjecture INCREASE C # Will be nuked when reaches 1 (and if already 1) INCREASE K REPEAT X TIMES ( REPEAT K TIMES ( REPEAT M TIMES ( INCREASE N ) INCREASE M REPEAT N TIMES ( CLEAR K # Loop will break ) ) ) REPEAT K TIMES ( # If loop went through (stopped at 1) CLEAR C ) REPEAT X TIMES ( # Is the first number odd? INCREASE P REPEAT O TIMES ( CLEAR O CLEAR P ) REPEAT P TIMES ( INCREASE O ) ) INCREASE I REPEAT A TIMES ( REPEAT C TIMES ( # Continue if hasn't reached 1 REPEAT L TIMES ( # If swapping variables requested... REPEAT J TIMES ( INCREASE T ) REPEAT I TIMES ( INCREASE J CLEAR I ) REPEAT T TIMES ( INCREASE I CLEAR J CLEAR T ) CLEAR L ) REPEAT I TIMES ( CLEAR Y CLEAR O CLEAR P CLEAR Q REPEAT X TIMES ( # Is odd? INCREASE P REPEAT O TIMES ( CLEAR O CLEAR P INCREASE Y INCREASE Q ) REPEAT P TIMES ( INCREASE O CLEAR Q ) ) REPEAT Q TIMES ( PRINT Y INCREASE L # Stop if 1 (Clear C) INCREASE V REPEAT Y TIMES ( REPEAT V TIMES ( REPEAT Z TIMES ( INCREASE W ) INCREASE Z REPEAT W TIMES ( CLEAR V # Loop will break CLEAR W # Clear everything else if continuing CLEAR Z ) ) ) ) REPEAT O TIMES ( # Multiply and increment if odd CLEAR Y REPEAT X TIMES ( INCREASE Y INCREASE Y INCREASE Y ) INCREASE Y PRINT Y CLEAR X CLEAR D CLEAR E REPEAT Y TIMES ( # Divide by 2 INCREASE E REPEAT D TIMES ( INCREASE X CLEAR D CLEAR E ) REPEAT E TIMES ( INCREASE D ) ) PRINT X # Stop if 1 (Clear C) INCREASE V REPEAT X TIMES ( REPEAT V TIMES ( REPEAT Z TIMES ( INCREASE W ) INCREASE Z REPEAT W TIMES ( CLEAR V # Loop will break CLEAR W # Clear everything else if continuing CLEAR Z ) ) ) ) REPEAT V TIMES ( # If loop went through (stopped at 1) CLEAR C ) ) # THE SAME PROGRAM UNDERNEATH BUT WITH X AND Y SWAPPED!!! BE CAUTIOUS AND STUFF!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! REPEAT J TIMES ( CLEAR X CLEAR O CLEAR P CLEAR Q REPEAT Y TIMES ( # Is odd? INCREASE P REPEAT O TIMES ( CLEAR O CLEAR P INCREASE X INCREASE Q ) REPEAT P TIMES ( INCREASE O CLEAR Q ) ) REPEAT Q TIMES ( PRINT X INCREASE L # Stop if 1 (Clear C) INCREASE V REPEAT X TIMES ( REPEAT V TIMES ( REPEAT Z TIMES ( INCREASE W ) INCREASE Z REPEAT W TIMES ( CLEAR V # Loop will break CLEAR W # Clear everything else if continuing CLEAR Z ) ) ) ) REPEAT O TIMES ( # Multiply and increment if odd CLEAR X REPEAT Y TIMES ( INCREASE X INCREASE X INCREASE X ) INCREASE X PRINT X CLEAR Y CLEAR D CLEAR E REPEAT X TIMES ( # Divide by 2 INCREASE E REPEAT D TIMES ( INCREASE Y CLEAR D CLEAR E ) REPEAT E TIMES ( INCREASE D ) ) PRINT Y # Stop if 1 (Clear C) INCREASE V REPEAT Y TIMES ( REPEAT V TIMES ( REPEAT Z TIMES ( INCREASE W ) INCREASE Z REPEAT W TIMES ( CLEAR V # Loop will break CLEAR W # Clear everything else if continuing CLEAR Z ) ) ) ) REPEAT V TIMES ( # If loop went through (stopped at 1) CLEAR C ) ) ) )