## Square Nimbers

If you haven’t read yesterday's article which introduces nimbers then this isn't going to make any sense.

There are so many patterns in the multiplication table for nimbers that it is quite daunting to start unravelling it. I want to focus on the leading diagonal which are the square nimbers. Unlike with numbers, most nimbers seem to be square nimbers and so far we can see no repeats. The natural question is whether there is a one to one mapping with nimbers and their squares, thus guaranteeing that all square roots are integer.

Let's look at the first few squares:

If put the working for the first few. If you are cringing at my distributing of the squares over the brackets like when squaring 3, then let me set you mind at ease. With nimbers like cancels out like. So (a+b)^2=a^2+ab+ab+b^2=a^2+b^2 because the middle terms cancel out. This lets us expand the brackets easily which speeds up the whole process making all of the results up until 8.

At 8 we need a new trick because 8^2 isn't just 3/2 the result for numbers. This is because it isn't a Fermat power of 2 (see the introduction to nimbers for more on this). But by writing 8 as 4x2 we get around this.

The results seem to form different regions up until each Fermat power of 2. Here's the same image with the regions labelled on:

It certainly looks tempting to suggest that each region contains all of the next consecutive numbers albeit in some weird order. I've was hoping that I could work out the general pattern so that I could find a way of doing a square root of any number rather than just using trial and error. However it appears to be chaotic and the only routes into the problem employ an area of mathematics which is beyond my scope as an applied mathematician: field theory. Sometimes I start writing these articles without already having a solution and occasionally the problem ends up being larger than I originally thought. However there is something to be learned from the process of trying, so I'll fill you in on my attempts.

At first I thought that the order of the numbers might be related to Gray Code. Think of it this way: imagine you tap your right hand on the table. But being the slightly obsessive compulsive mathematician that you are, you value symmetry, so you then tap your left hand. But the right hand has still had preference because it went first so you do two more taps, this time left then right. This is better, but in the sequence so far of rllr we could make it even more symmetrical by tapping lrrl straight after. This sequence continues forever, never quite balancing out. So r l lr lrrl lrrlrllr …

It turns out that this sort of reflective symmetry is a near miss for what's going on with the square nimbers. Ah well.

It turns out that because each sub grid (sub field) of size a Fermat power of 2 has to be self contained, the numbers for size n can't go above n and there are no repeats on that main diagonal. So what we wanted is true, but there is no general square root function. Also I've found a forum post claiming that there is no general quadratic formula for nimbers either (which is a related, but harder concept). Although you can solve some quadratics by trial and error like x^2+x+1 factorises to (x+2)(x+3) (which just looks weird, but expand it out and check) you can't solve the general form.

Ah well. A null result is still a result.