login
Table of "minimum oddness" operation.
2

%I #11 Feb 09 2020 04:02:53

%S 0,0,0,0,1,0,0,2,2,0,0,1,2,1,0,0,4,2,2,4,0,0,1,4,3,4,1,0,0,6,2,4,4,2,

%T 6,0,0,1,2,5,4,5,2,1,0,0,8,2,6,4,4,6,2,8,0,0,1,8,3,4,5,4,3,8,1,0,0,10,

%U 2,8,4,6,6,4,8,2,10,0,0,1,2,9,8,5,6,5,8,9,2,1,0,0,12,2,10,4,8,6,6,8,4,10,2

%N Table of "minimum oddness" operation.

%C T(i,j) is whichever of i,j has the 0 in the rightmost differing bit of their binary representations. Defines a complete ordering of the integers: all even numbers are "less odd" than all odd numbers, for numbers of same parity remaining bits are recursively compared to determine ordering.

%H Rémy Sigrist, <a href="/A103822/b103822.txt">Table of n, a(n) for n = 0..10295</a> (antidiagonals 0..142)

%H Rémy Sigrist, <a href="/A103822/a103822.png">Colored representation of T(n, k) for n, k = 0..1023</a> (where the hue is function of T(n, k))

%F T(i, j) = min(Ri, Rj), where Rn is the reflection of n at the "binary point".

%e T(11,13)=13, since the rightmost differing bit position is 1 for 11=1011 binary and 0 for 13=1101 binary.

%o (PARI) T(n,k) = { if (n==k, return (n), for (i=0, oo, my (nn=bittest(n,i), kk=bittest(k,i)); if (nn && !kk, return (k), kk && !nn, return (n)))) } \\ _Rémy Sigrist_, Feb 08 2020

%Y Cf. A103823 (the complementary operation).

%K base,easy,nonn,tabl

%O 0,8

%A _Marc LeBrun_, Feb 16 2005