On the Subject of Dysfunctions

How do you get 23 from 1 and 2? Wait, don’t worry it’s 3 now.

This module consists of 3 displays on the top and bottom, and 6 buttons numbered 0 though 5, a comma, query and submit button.

To query the module, enter the first number in with the number buttons, press the comma button, enter the second number, and then press the query button. Every input can be at most 5 digits long.

All functions and numbers on this page are listed in base-6 (see APPENDIX 6), and so will your inputs and the query result

There will also be restrictions on what you can query next as given by middle screen on the top, which will always be between 02 and 55, with a positive or negative sign on top.

Both numbers must alternate between being divisible by and not being divisible by the number. In addition, the third digit from the right of both numbers must change from the sets (0,1), (2,3), and (4,5), going right if the middle number has a + and left if the middle number has a - wrapping around. If the query is less than 3 digits, it assumes that 3rd digit is 0 for the purposes of the restrictions.

NOTE! IT IS POSSIBLE TO PUT THE MODULE IN A STATE WHERE YOU CANNOT SOLVE WITHOUT STRIKING AFTER THE FIRST QUERY. REFER TO THE SUBMISSION INFORMATION FOR DETAILS.

The module also changes the function after every successful query. It applies a metafunction (chosen at initialization) to the output of the previous query as the first number and one of the inputs (determined at initialization) as the second input. It adds the result of this query to the index of the previous function and then mods 36. The result is the index of the new function. (all indexes listed on the next page are in base 6)

To solve the module, press the submit button anytime the two numbers on top are a valid query, with the left number as the first number and the right number as the second number. Perform the current function on those two numbers. Then, concatenate the current function number and then the metafunction number in that order, and add that to the result. Submit the result of this into the module to solve it.

When the module strikes, the function will not change, and all query limits will be cleared for the next query. Note that you can submit at this time.

The Functions.

#00: Lunar Multiplication
#01: Digital Root(a) + Digital Root(b)
#02: All even numbers then all odd numbers, listed in order of appearance.
#03: Bitwise XOR.
#04: sqrt(a^2+b^2).
#05: a+b.
#10: Number of digits not in the inputs.
#11: abs(high digits concatenated in order- low digits concatenated in order).
#12: a+b in Base 5.
#13: a*b.
#14: (Last digit of a)*b.
#15: Palindrome Difference.
#20: abs((a%1000)^3-(b%1000)^3)
#21: (a%30) choose (b%30)
#22: Segments in 14 segment displays of the inputs.
#23: GCF of the inputs.
#24: LCM of the inputs.
#25: (a+b)/2.
#30: Look and Say added together.
#31: Larger % Smaller.
#32: abs(a*(a+1)/2-b*(b+1)/2).
#33: Larger/Smaller.
#34: In place subtraction.
#35: abs(2*smaller-larger).
#40: Digital Root (a+b).
#41: 1/(1/a+1/b)
#42: (a-b)^2/a
#43: Digits sorted from smallest to largest.
#44: Prime factors of both numbers added together.
#45: (a-b)/2
#50: Total # of the digit 2 in ternary (Base-3)
#51: Lunar Addition.
#52: All digits added together.
#53: Number of 0s in binary of both inputs.
#54: Base 36 numbers added together.
#55: Base 36 Digital Roots added together.

Notes on the Functions.

All user inputs can be at most 5 digits long, and submission is at most 10 digits long. All inputs have leading 0s removed before any functions are evaluated. If the module tries to divide by 0, it replaces that fraction with the numerator (2/0 would become 2, for example). a%0 becomes a. The outputs are shortened to 10 digits, floored to integers, and have leading 0s removed. All numbers listed on both this page and the previous page are in base-6.

Lunar Addition/Multiplication (functions 00 and 51): The module uses the same methods found in this manual

All digits in order (functions 02 and 11): List all applicable digits in order of appearance, starting at the first input and then the second input. The low digits are (0, 1, 2) and the high digits are (3, 4, 5).

Base 5 addition (function 12): Convert a and b into base 10 and add them. Convert the sum to base 5. This gives you a string of base 5 digits. Do not convert back into base-6.

Palindrome difference (function 15): append both inputs together, a and then b. Then, take the absolute difference between the first and the last digit, and make that the first digit of the result. After that, do that with the next 2 digits going in, and repeat until there are no more digits. If there is one number left, the corresponding digit is 0.

In place subtraction (function 34): Addition but you take the absolute difference between the digits.

GCF is the largest number that can evenly divide both inputs, LCM is the smallest number that evenly divides both inputs.

Look and say addition (function 30): make the look and say sequence corresponding to each input, and then add them together. If a run is longer than 5 digits, take the run length mod 6.

Binary 0s/Ternary 2s: (Functions 50 and 53): Count the total number of 0 digits in the binary representation of the numbers, or the number of 2 digits in ternary.

Choose operation (Function 21): Let x = a % 30 and y = b % 30. Let n = max(x,y) and k = min(x,y). The binomial coefficient C(n,k) is n!/(k!(n−k)!). Convert the decimal result to base‑6 for the output.

APPENDIX: BASE-6

To convert into base-6, take the remainder of the number when you divide by 6. Then, divide the remaining number by 6, removing any decimals. Keep doing this until you have 0, prepending the remainders to your result each time. After you get 0, the string of digits is the number in base-6.

To convert into base 5, do the process for base-6, but instead of dividing by 6 and taking the modulo, divide by 5 and take the remainder. Everything else is the same between the processes. To convert a number from base-6 into base 36, take the last two digits, and find the equivalent in base 36. For example, if the number is 241043, then the last digit of the converted number would use the digits 43, and the new converted number would end with R, which as a decimal value of 27. Keep doing this until you don’t have any more digits left to convert.