OFFSET
0,4
COMMENTS
T(i,j) is whichever of i,j has the 1 in the rightmost differing bit of their binary representations. Defines a complete ordering of the integers: all odd numbers are "more odd" than all even numbers, for numbers of same parity remaining bits are recursively compared to determine ordering.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..10295
Rémy Sigrist, Colored representation of T(n, k) for n, k = 0..1023 (where the hue is function of T(n, k))
FORMULA
T(i, j) = max(Ri, Rj), where Rn is the reflection of n at the "binary point".
EXAMPLE
T(11,13)=11, since the rightmost differing bit position is 1 for 11=1011 binary and 0 for 13=1101 binary.
PROG
(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 (n), kk && !nn, return (k)))) } \\ Rémy Sigrist, Feb 08 2020
CROSSREFS
KEYWORD
AUTHOR
Marc LeBrun, Feb 16 2005
STATUS
approved