ROSECODE 307
Nim operations
In mathematics, the nimbers, also called Grundy numbers, are introduced in combinatorial game theory, where they are defined as the values of nim heaps. They arise in a much larger class of games because of the Sprague–Grundy theorem. The nimbers are the ordinal numbers endowed with a new nimber addition and nimber multiplication, which are distinct from ordinal addition and ordinal multiplication.
Visit the following page for more info on nimber addition and nimber multiplication:
Nimber - Wikipedia, the free encyclopedia
We also define Nimber square root such that it returns a number which, when the nimber multiplication applied to itself, returns the original number:
s = Nim_sqrt(n) such that n = Nim_prod(s,s)
Similarly Nimber inverse of a number is the one when the nimber multiplication is applied, returns 1:
1 = Nim_prod(n,Nim_inv(n))
Evaluate the following using the above mentioned operations from n=0x100000 (hex) to 0x110000 (inclusive) and find the sum of the results.
Answer format: number (in decimal)
[My timing: 6s]
Answer format: number (in decimal)
[My timing: 6s]