3blue1brown level for Devil's Calculator

1k Views Asked by At

There's this math game I've been playing called the Devil's Calculator. I saw on twitter that Grant Sanderson made a level and I love 3blue1brown so I wanted to try it (it's free to download).

The premise of the game is you have unknown operator symbols and you have to figure out what they do and then use them to calculate a number, in this case 40 (usually 666). Here's the website.

In the level you can't use the number 9 or a decimal point (on fire) and there are unknown unary and binary operators. It recommends you watch the 3blue1brown video "Pi hiding in prime regularities" which mentions lattice points around a circle of radius sqrt of x, so I got that A004018 is basically the unary function.

I can't really find a formula for this, so I've given myself to using what little programming skills I have to build it in python, but none of that matters if I can't figure out the binary operator (you need to use both operators to calculate 40). Sorry for the long explanation, but my question is basically, what is the binary function doing and how would you calculate 40 without using a decimal point or a 9 and using both A004018 and the binary function.

Here is some example data from the binary function, X -

  • 1X1=1 (1Xn=n)
  • 1X2=2
  • 1X3=3
  • 1X4=4
  • 2X2=1 (any number nXn=n, I think)
  • 3X3=1
  • 4X4=1
  • 2X4=2 (any number nXp=n/p if n is greater than p and they divide evenly)
  • 4X2=2
  • 2X6=3
  • 3X15=5
  • 2X3=12 (I have no clue what is going on)
  • 2X5=22
  • 5X33=6112
  • 4X7=113
  • 6X11=115
  • 82X6=1312

NOTE: I know that 40X1=40 and there are other binary solutions that equal 40, but I need one that uses A004018. So for example, if the binary function is b and the unary function u, I'd need like b(u(x),y)=40 or u(b(x,y))=40 etc...

Thank you for your help. I'm pulling my hair out on this!

EDITS: In this particular level, There are only two functions, binary and unary. The distinction between the regular unary function and the OEIS one seems a bit superficial, in this one it's the diamond symbol, not sure why they chose to do that. Yes, I understand it would be difficult without actually playing the game and experimenting. I'm going to finish my python script and update the post if I can find a solution that equals 40 using the unary lattice points function thing. If I find that, it'll just be a matter of getting the binary function to return that answer, in the form u(b(x,y))=40. I've added some more data below:

  • 3X4=13
  • 4X5=14
  • 5X6=15
  • 6X7=16
  • 7X8=17
  • 3X5=112 (what??)
  • 4X6=12
  • 5X7=122
  • 2X5=22
  • 2X7=32
  • 3X7=23
  • 10X3=33
  • 11X2=52
  • 11X3=312
  • 11X4=213
  • 11X5=25

  • 0X3=0 (0Xn=0)

Division must be happening somewhere because I get errors when using 0 in the second place, but it's otherwise commutative I think....

1

There are 1 best solutions below

0
On

I figured out the binary operator. If the greater number is perfectly divisible, you get the quotient, but if not the following happens.

So for example if you do 5¥3, you get 112. These are the steps you need to do to reach that number:

5/3=1 with remainder 2

Now you divide the divisor with the remainder you got, so

3/2= 1 with remainder 1

2/1=2 with remainder 0

So aggregating all the answers give us 112. There may be a more complex function here, but this method yields the right answer every time. Another example:

85¥6=146 Steps:

85/6= 14 with remainder 1

6/1= 6 with remainder 0

Final aggregated answer=146

I still can't figure out the unary function though. If you have that part figured out, please do help me out :3