(I discovered this in high school, sent it off to a journal, never heard back, and forgot about it. I've never found anyone else who appeared to know about it; the combinatorial game theorists I've mentioned it to have all been surprised.)

It turns out that the set of second-player wins in $d$-pile Nim (P-positions), considered as a point in $d$-space, has a Sierpinski structure.

This is only obvious in dimensions greater than 2. With $d=3$, the set of P-positions is a Sierpinski pyramid; in higher dimensions it's a demihypercube.

Since P-positions are those with coordinates which xor to 0, I figure this has got to be related to other relationships between Sierpinski's triangle and xor - for example, the fact that the Sierpinksi triangle is generated by taking $\{(x, y) \in \mathbb{N}^d \mid x+y = x \oplus y\}$ (where $\oplus$ denotes xor) (*). I haven't seen that fact mentioned anywhere, come to think, although it's an easy consequence of a paper by Fraenkel and Kontorovich; that paper is also the only other to relate Nim and the Sierpinski triangle that I know of, but in a very different way that I do, as far as I can tell.

(*) In fact this is easily implied by my result by considering just the plane $x+y=z$, but it feels like there should be something deeper here, some connection in the other direction.

**So my question is**: does anyone know anything about this relationship between the Sierpinski gasket and Nim? Is anyone even aware of it? Can anyone draw connections between this relationship and other known facts about the Sierpinski gasket?