OFFSET
0,8
COMMENTS
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.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..10295 (antidiagonals 0..142)
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) = min(Ri, Rj), where Rn is the reflection of n at the "binary point".
EXAMPLE
T(11,13)=13, 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 (k), kk && !nn, return (n)))) } \\ Rémy Sigrist, Feb 08 2020
CROSSREFS
KEYWORD
AUTHOR
Marc LeBrun, Feb 16 2005
STATUS
approved